This article explains how to WordsApi and AppendDocument can be used to merge Word documents (see the [DOCX format](https://kb.fileformat.app/extension/docx-file-info/)) with the Aspose.Words for Java Cloud SDK via the Java REST API, allowing you to read multiple source files, combine them with a destination file, and download the final merged document.
Prerequisite
- Create an account and get API credentials
- Download Aspose.Words Cloud SDK for Dotjava to add or update Word document properties
- Setup Java solution project with the above SDK
Steps to Combine Word Documents with Java Low Code API
- Create the WordsApi object using the client ID and secret
- Instantiate the AppendDocumentRequest object and set the input source Word file
- Read the input Word file into the memory stream and upload the file
- Use the DocumentEntryList by reading the multiple Word files to append
- Set the destination file name and call the WordsApi.AppendDocument method for combining the files
- Download the destination file from the cloud and save it on the disk
The aforementioned steps combine multiple Word documents with Java Low Code API. Commence the process by creating the WordsApi class object and uploading the source Word file to the Cloud where you want to merge other Word files. Read multiple Word files, set the destination Word file name, and call the AppendDocument() method to combine the Word files in the cloud before downloading the output.
Code to Merge Word Files Online with Java REST API
This code demonstrates how to merge Word documents online with the Java REST API. It uses the WordsApi class to upload the source Word file, merges multiple files using the AppendDocument() method, and downloads the resultant Word file. Use the DocumentEntryList to add multiple files for merging by providing the import format mode and individual file contents.
This article has taught us the process to merge Word files with Java REST API. If you want to add/update Word file properties, read the following article: Change properties of Word document with NET REST API.
Keywords: merge word documents with NET REST API; append word documents with Java REST API; merge word documents online with NET REST API; combine word files with Java Low Code API.