Remove Watermark from Word Document in Java

This article demonstrates how to remove watermark including text watermark and image watermark from a Word document using Spire.Doc for Java.

The following screenshot shows the example Word document which contains an image watermark:

Remove Watermark from Word Document in Java

import com.spire.doc.Document;
import com.spire.doc.FileFormat;

public class RemoveWatermark {
    public static void main(String[] args){
        //Create a Document instance
        Document doc = new Document();
        //Load the Word document
        doc.loadFromFile("ImageWatermark.docx");

        //Set the watermark as null to remove the image (or text) watermark
        doc.setWatermark(null);

        //Save the document
        doc.saveToFile("RemoveWatermark.docx", FileFormat.Docx_2013);
    }
}

The following screenshot shows the output Word document after removing watermark:

Remove Watermark from Word Document in Java