In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the "Java delete / copy Word document watermark method is what" the relevant knowledge, in the actual case of the operation process, many people will encounter such a dilemma, then let Xiaobian lead you to learn how to deal with these situations! I hope you can read it carefully and be able to achieve something!
Jar package Import
Method 1: download the Free Spire.Doc for Java package and extract it, and then import the Spire.Doc.jar package under the lib folder into the Java application as a dependency.
Method 2: install the JAR package through the Maven warehouse and configure the pom.xml file as follows
Com.e-iceblue http://repo.e-iceblue.cn/repository/maven-public/ e-iceblue spire.doc.free 2.7.3
Original Word document:
Delete the text watermark:
Import com.spire.doc.Document;import com.spire.doc.FileFormat;public class RemoveWatermark {public static void main (String [] args) {/ / create Document instance Document doc = new Document (); / / load Word document doc.loadFromFile ("text watermark .docx") / / set watermark to empty doc.setWatermark (null); / / Save document doc.saveToFile ("RemoveWatermark.docx", FileFormat.Docx_2013);}}
Delete the text watermark effect:
Copy the image watermark:
Import com.spire.doc.*;public class CopyWatermark {public static void main (String [] args) {/ / load document 1 Document doc1 = new Document (); doc1.loadFromFile ("picture watermark .docx"); / / load document 2 Document doc2 = new Document (); doc2.loadFromFile ("target.docx") / / get the watermark effect of document 1, and set it to document 2 doc2.setWatermark (doc1.getWatermark ()); / / Save document 2 doc2.saveToFile ("CopyWatermark.docx", FileFormat.Docx_2013); doc2.dispose ();}}
Copy the image watermark effect:
This is the end of the content of "what is the method for Java to delete / copy the watermark of Word documents". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
We will make a page that can remember the names of the visitors, here
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.