This article shows how to Aspose.Words Cloud SDK and Java can be used to remove borders from a Word document (DOCX) via the REST API. You will learn to automatically remove paragraph borders in Word with the Java cloud SDK, handling individual borders or clearing all borders from a paragraph. For more information about the DOCX format, see the DOCX file info page.
Prerequisite
- Create an account and get API credentials
- Download the Aspose.Words Cloud SDK for Java to work with Word files
- Set up a Java project and add the SDK as a dependency
Steps to Remove a Border in Word with Java Low Code API
- Initialize the WordsApi object by providing the client ID and client secret.
- Create an instance of the DeleteBordersOnlineRequest class for removing all borders.
- Read the input Word file into a memory stream that will be sent to the API.
- Set the destination file name, node path, and document binary stream in the request object.
- Call the DeleteBordersOnline() method to remove the borders.
- Save the output stream returned in the API response to a file.
The steps above summarize how to remove borders in Word with the Java Low Code API. Create a WordsApi object, build a DeleteBordersOnlineRequest, configure its properties, and invoke DeleteBordersOnline() to delete the borders.
Code to Remove Paragraph Border in Word with Java REST API
This sample demonstrates how to remove a border in Word using the Java REST API. When calling DeleteBordersOnline() you do not need to specify a border type; however, if you need to delete a specific border, use the DeleteBorderOnline() method and set the border type in the request object.
We have learned to remove borders from paragraphs. To add a border to a paragraph, refer to the following article: Add a Border to a Word Document with Java REST API.
Keywords: remove borders in word with NET REST API; how to remove a border in word with NET REST API; how to remove border in word with Java Low Code API.