The Gist contains code snippets related to Aspose.Words Cloud SDK for Java. For more information on usage of these code snippets, please visit the following links
Last active
April 24, 2021 07:55
-
-
Save aspose-cloud/b179512782fd7f49d9128cf4da321685 to your computer and use it in GitHub Desktop.
This Gist repository contains code snippet related to Aspose.Words Cloud SDK for Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get clientId and clientSecret from https://dashboard.aspose.cloud/ | |
String clientId = "c235e685-1aab-4cda-a95b-54afd63eb87f"; | |
String clientSecret = "b8da4ee37494f2ef8da3c727f3a0acb9"; | |
// if baseUrl is null, WordsApi uses default https://api.aspose.cloud | |
// create an object of ApiClient by providing user specific ClientID and Client Secret | |
ApiClient apiClient = new ApiClient(clientId,clientSecret,null); | |
// create an object of WordsApi by providing ApiClient as argument | |
WordsApi wordsApi = new WordsApi(apiClient); | |
// input PDF document | |
String inputFile = "file-sample.docx"; | |
String firstFileToAppend = "test_multi_pages.docx"; | |
String resultantFile = "Resultant.docx"; | |
// specify the first document to be appended | |
DocumentEntry docEntry = new DocumentEntry().href(firstFileToAppend).importFormatMode("KeepSourceFormatting"); | |
// specify the list of documents to be appended | |
DocumentEntryList documentList = new DocumentEntryList().addDocumentEntriesItem(docEntry); | |
// Specify the conversion parameters | |
AppendDocumentRequest request = new AppendDocumentRequest(inputFile, documentList, null, null, null, null, resultantFile, null, null); | |
// save the resultant merged DOCX file | |
DocumentResponse result = wordsApi.appendDocument(request); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merge DOCX files usinig Aspose.Words Cloud SDK for Java. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment