当前位置:网站首页>C#/VB. Net to delete watermarks in word documents
C#/VB. Net to delete watermarks in word documents
2022-07-07 02:25:00 【51CTO】
stay Word Watermarks added to documents , Such as text watermark or image watermark , Can effectively show ownership , It can also play a certain warning effect . But what if you want to delete these watermarks ? This article will provide a way to delete Word Methods of watermarking in documents . This method is suitable for deleting text watermark and image watermark . Here are the detailed methods and steps .
Program environment
In this test , Introduce... Into the program Free Spire.Doc for .NET. Can be referenced by Spire.Doc.dll file :
Method 1: take Free Spire.Doc for .NET Download to local , decompression , install . After installation , Find the installation path BIN In folder Spire.Doc.dll. And then in Visual Studio Open in “ Solution explorer ”, Right click “ quote ”,“ Add reference ”, The local path BIN Under folder dll Add a reference to the program .
Method 2: adopt NuGet install . This can be done by 2 Methods of installation :
(1) Can be in Visual Studio Open in “ Solution explorer ”, Right click “ quote ”,“ management NuGet package ”, And then the search “Free Spire.Doc”, Click on “ install ”. Wait for the program installation to complete .
(2) Copy the following to PM Console installation .
Install-Package FreeSpire.Doc -Version 10.2.0
Specific steps :
- initialization Document An instance of a class .
- call Document.LoadFromFile(string fileName, FileFormat fileFormat) Method loading Word file .
- take Document.Watermark Property is set to null.
- adopt Document.SaveToFile(string fileName, FileFormat fileFormat) Method to save the result document to the specified path .
Complete code :
【C#】
【VB.NET】
design sketch :
边栏推荐
- Introduction to the internal structure of the data directory of PostgreSQL
- Flir Blackfly S 工业相机:自动曝光配置及代码
- Zabbix 5.0:通过LLD方式自动化监控阿里云RDS
- #yyds干货盘点# 解决名企真题:最大差值
- Recommended collection!! Which is the best flutter status management plug-in? Please look at the ranking list of yard farmers on the island!
- Tips for web development: skillfully use ThreadLocal to avoid layer by layer value transmission
- 【LeetCode】Day97-移除链表元素
- Flir Blackfly S 工业相机:通过外部触发实现多摄像头同步拍摄
- The foreground downloads network pictures without background processing
- 组合导航:中海达iNAV2产品描述及接口描述
猜你喜欢
Web3的先锋兵:虚拟人
SchedulX V1.4.0及SaaS版发布,免费体验降本增效高级功能!
【森城市】GIS数据漫谈(二)
强化学习如何用于医学影像?埃默里大学最新《强化学习医学影像分析》综述,阐述最新RL医学影像分析概念、应用、挑战与未来方向
Data connection mode in low code platform (Part 1)
Big guys gather | nextarch foundation cloud development meetup is coming!
Twenty or thirty thousand a leaf? "Yang Mou" behind the explosion of plant consumption
This week's hot open source project!
Introduction to FLIR blackfly s industrial camera
一片葉子兩三萬?植物消費爆火背後的“陽謀”
随机推荐
ZABBIX 5.0: automatically monitor Alibaba cloud RDS through LLD
[xlua notes] array of lua to array of C #
传感器:DS1302时钟芯片及驱动代码
The boss is quarantined
Integrated navigation: product description and interface description of zhonghaida inav2
云原生混部最后一道防线:节点水位线设计
【Unity】升级版·Excel数据解析,自动创建对应C#类,自动创建ScriptableObject生成类,自动序列化Asset文件
Introduction to RC oscillator and crystal oscillator
A new path for enterprise mid Platform Construction -- low code platform
Flir Blackfly S 工业相机:配置多个摄像头进行同步拍摄
The cities research center of New York University recruits master of science and postdoctoral students
Treadpoolconfig thread pool configuration in real projects
[paper reading | deep reading] anrl: attributed network representation learning via deep neural networks
Halcon knowledge: segment_ contours_ XLD operator
Freeswitch dials extension number source code tracking
The foreground downloads network pictures without background processing
Flir Blackfly S USB3 工业相机:计数器和定时器的使用方法
投资的再思考
Redis tool class redisutil (tool class III)
解密函数计算异步任务能力之「任务的状态及生命周期管理」