Merge Multiple Word Documents into Single Doc using REST API in Python


/ Published in: Python
Save to your folder(s)

This REST example uses pycurl library to send HTTP request and handle HTTP response so you need to install it to use this example. Once input Word documents are uploaded, you can use the following URI to merge documents on Aspose for Cloud or any supported third party storage.


http://api.aspose.com/v1.1/words/MainDocument.docx/appendDocument


You can use a couple of optional parameters with the above mentioned URI. All or specific parameters can be used according to your requirement.

After building URI, you need to go through the following steps:

• Set App SID and App Key and sign URI. See section 1 of the following code and Sign URI method for more details.
• Build JSON to post in the request body. A list of input documents including their paths and import format modes should be provided. See section 2 of the following code.
• Send a POST request to Aspose for Cloud service. See section 3 of the following code and process_command method for more details.
• Download merged document file if required. See section 4 of the following code.

URL: http://www.aspose.com/blogs/aspose-products/aspose-words-product-family/archive/2014/03/18/merge-multiple-word-documents-into-one-document-in-python.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.