This article describes how to remove watermark from Word with Python REST API. You will learn to automatically delete watermark in Word with Python Low Code API using the Python cloud SDK. It not only shares details about removing the watermark online but also describes downloading the output file from the cloud.
Prerequisite
- Create an account and get API credentials
- Download Aspose.Words Cloud SDK for Python to remove watermark from a Word file
- Setup Python solution project with the above SDK for deleting the watermark
Steps to Remove Water Mark from Word with Python Low Code API
- Create an object of the WordsApi class to delete the watermark
- Create an object of the DeleteWatermarkOnlineRequest class and set the destination file name
- Read the input file into the FileStream object to remove the watermark
- Call the DeleteWatermarkOnline object to eliminate the watermark
- Retrieve the resultant Word file from the API response using the Document.TryGetValue() method
These steps define how to remove water mark in Word with Python REST API. Commence the process by creating a WordsApi object and a DeleteWatermarkOnlineRequest object by providing the destination file name. Read the input Word file and invoke the DeleteWatermarkOnline method with the above request object to eliminate the watermark.
Code for Removing a Watermark from a Word Document with Python Low Code API
This code demonstrates how to remove watermark from Word document with Python REST API. While initializing the DeleteWatermarkOnlineRequest object set the load encoding, password, encrypted password, estimation file name, revision author, and date. The output file reference is shared in the response by the API that can be used to fetch the output file.
In this topic, we have learned how to delete a watermark. To add a watermark, refer to the following article: Add a watermark in Word with Python REST API.