Wednesday, 04 April 2018 08:50

Remove the text and image watermark from the word document in C#

Written by  support iceblue
Rate this item
(0 votes)

Spire.Doc supports to insert the text and image watermark to the word document in C#. It also supports to remove the text and image watermark from the word document. This article will demonstrate how to remove the watermark from the word document by setting the watermark object as null.

Firstly, view the word document with Text and Image watermark:

Remove the text and image watermark from the word document in C#

Remove the text and image watermark from the word document in C#

Step 1: Create a new instance of Document and load the document from file.

Document doc = new Document();
doc.LoadFromFile("Sample.docx",FileFormat.Docx2010);

Step 2: Set the watermark as null to remove the text and image watermark.

doc.Watermark = null;

Step 3: Save the document to file.

doc.SaveToFile("RemoveWatermark.docx",FileFormat.Docx2010);

Effective screenshot after removing the watermark:

Remove the text and image watermark from the word document in C#

Full codes of removing the watermark from the word document:

Document doc = new Document();
doc.LoadFromFile("Sample.docx",FileFormat.Docx2010);

doc.Watermark = null;

doc.SaveToFile("RemoveWatermark.docx",FileFormat.Docx2010);

Additional Info

  • tutorial_title: Remove the text and image watermark from the word document
Last modified on Wednesday, 04 April 2018 09:45