Follow this article to delete watermark in Word using Python. Get the details to set the environment, a list of steps, and a sample code showing how to remove a watermark in Word using Python. It discusses text and image type watermarks and guides for checking the available watermark type in a Word file.
Steps to remove a watermark in Word using Python
- Establish the environment to use Aspose.Words for Python via .NET to remove the watermark
- Load the source Word file with a watermark into a Document object
- Check if the watermark type of the loaded Word file is TEXT
- Call the remove() method to delete the watermark if present
- Save the output Word file with no watermark
These steps explain how to remove the draft watermark in Word using Python. Load the source Word file, check the presence of a watermark, and remove it if it is found. Save the output Word file after deleting the watermark.
Code to Remove a Watermark From a Word Document using Python
This code has demonstrated how to remove draft watermark in Word using Python. You can check the presence of an image or text watermark using the WatermarkType enumerator. The remove() method can be used for removing TEXT and IMAGE both types of watermarks however a document can have only one type of watermark at a time.
This article has taught us to remove a watermark. If you want to delete a page break in a Word file, refer to the article on How to delete page break in Word using Python.