当前位置:网站首页>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 :

边栏推荐
- Processing image files uploaded by streamlit Library
- STM32F4---通用定时器更新中断
- Tiflash source code reading (IV) design and implementation analysis of tiflash DDL module
- 【LeetCode】Day97-移除链表元素
- Robot team learning method to achieve 8.8 times human return
- Flir Blackfly S 工业相机:配置多个摄像头进行同步拍摄
- Web开发小妙招:巧用ThreadLocal规避层层传值
- Flir Blackfly S工业相机:颜色校正讲解及配置与代码设置方法
- A new path for enterprise mid Platform Construction -- low code platform
- Recommended collection!! Which is the best flutter status management plug-in? Please look at the ranking list of yard farmers on the island!
猜你喜欢
![[paper reading | deep reading] rolne: improving the quality of network embedding with structural role proximity](/img/21/59c4d61b22e7d021b7a72a64a16b48.png)
[paper reading | deep reading] rolne: improving the quality of network embedding with structural role proximity

Data connection mode in low code platform (Part 1)

Dall-E Mini的Mega版本模型发布,已开放下载

豆瓣平均 9.x,分布式领域的 5 本神书!

Flir Blackfly S 工业相机:通过外部触发实现多摄像头同步拍摄

张平安:加快云上数字创新,共建产业智慧生态

Decryption function calculates "task state and lifecycle management" of asynchronous task capability

fiddler的使用
![[unity notes] screen coordinates to ugui coordinates](/img/e4/fc18dd9b4b0e36ec3e278e5fb3fd23.jpg)
[unity notes] screen coordinates to ugui coordinates

Detailed explanation of line segment tree (including tested code implementation)
随机推荐
解密函数计算异步任务能力之「任务的状态及生命周期管理」
张平安:加快云上数字创新,共建产业智慧生态
Robot team learning method to achieve 8.8 times human return
Dall-E Mini的Mega版本模型发布,已开放下载
Introduction to FLIR blackfly s industrial camera
4--新唐nuc980 挂载initramfs nfs文件系统
[paper reading | deep reading] anrl: attributed network representation learning via deep neural networks
freeswitch拨打分机号源代码跟踪
长安链学习笔记-证书研究之证书模式
大咖云集|NextArch基金会云开发Meetup来啦!
6 seconds to understand the book to the Kindle
人脸识别应用解析
1500万员工轻松管理,云原生数据库GaussDB让HR办公更高效
Data connection mode in low code platform (Part 1)
Zhang Ping'an: accelerate cloud digital innovation and jointly build an industrial smart ecosystem
Tips for web development: skillfully use ThreadLocal to avoid layer by layer value transmission
Decryption function calculates "task state and lifecycle management" of asynchronous task capability
Real project, realized by wechat applet opening code (end)
XML to map tool class xmlmaputils (tool class V)
[xlua notes] array of lua to array of C #