Dear Team,
How to remove watermark in word document using Aspose java. I’ve attached input and expected output document for your reference.
Input : inp.zip (271.5 KB)
Expected OP :Exp_OP.zip (269.2 KB)
Thank you
Dear Team,
How to remove watermark in word document using Aspose java. I’ve attached input and expected output document for your reference.
Input : inp.zip (271.5 KB)
Expected OP :Exp_OP.zip (269.2 KB)
Thank you
Please try using the following code:
Document doc = new Document("E:\\temp\\input.docx");
HeaderFooter hf = doc.FirstSection.HeadersFooters[HeaderFooterType.HeaderPrimary];
Shape watermark = (Shape)hf.GetChildNodes(NodeType.Shape, true)[0];
watermark.Remove();
doc.Save("E:\\temp\\19.2.docx");
The standard way of removing watermark from Word document is mentioned in the following article:
How to Remove Watermark from a Document
Its working fine. Thank you.