With Java WordsApi, you can effortlessly strip a watermark from a Word (.docx) file using the Aspose.Words Cloud REST API and instantly download the cleaned document from the cloud.
Prerequisite
- Create an account and get API credentials
- Download the Aspose.Words Cloud SDK for Java to remove a watermark from a Word file
- Set up a Java project with the above SDK for deleting the watermark
Steps to Remove Water Mark from Word with Java 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 a File (or InputStream) object to remove the watermark
- Call the DeleteWatermarkOnline operation to eliminate the watermark
- Retrieve the resultant Word file from the API response using the Document.tryGetValue() method
These steps describe how to remove a watermark in Word with the Java REST API. Begin by creating a WordsApi instance and a DeleteWatermarkOnlineRequest with the desired output file name, read the source .docx document, and invoke DeleteWatermarkOnline to strip the watermark.
Code for Removing a Watermark from a Word Document with Java Low Code API
This example illustrates how to strip a watermark from a Word document using the Java REST API. When you create a DeleteWatermarkOnlineRequest, you can specify options such as load encoding, password, encrypted password, destination file name, revision author, and revision date. The API’s response returns a reference to the processed file, which you can then use to download the final document.
If you’d rather add a watermark instead, explore our detailed guide here: Add a watermark in Word with Java REST API.
By now you’ve learned how to delete watermark in word with Java Low Code API; how to remove water mark in word with Java REST API; remove watermark from word with NET REST API; and remove watermark from word document with NET REST API. Armed with these techniques, you can effortlessly strip unwanted watermarks from any Word file using either Java or .NET REST services.