This gist contains code snippets related to concatenation of PDF document using Aspose.PDF Cloud SDK for Python. For more information, please visit
Last active
November 24, 2021 18:23
-
-
Save aspose-cloud/19ff2c1bccf9a1df1d3bc7249fc006a1 to your computer and use it in GitHub Desktop.
This Gist contains code snippets related to PDF concatenation using Python SDK
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 your ClientId and ClientSecret from https://dashboard.aspose.cloud (free registration required). | |
#initialize PdfApi client instance using ClientID and ClientSecret | |
pdf_api_client = asposepdfcloud.api_client.ApiClient("d87269aade6a46cdc295b711e26809af", "a41d01ef-dfd5-4e02-ad29-bd85fe41e3e4") | |
# create PdfApi instance while passing PdfApiClient as argument | |
pdf_api = PdfApi(pdf_api_client) | |
# Source PDF document | |
file_name = 'PdfWithAnnotations.pdf' | |
# PDF file whose pages need to be appended | |
append_file_name = 'PdfWithTable.pdf' | |
# create options instance defining concatenation PDF | |
# start and end page of concatenating file | |
opts = { | |
"append_file": append_file_name, | |
"start_page": 1, | |
"end_page": 2 | |
} | |
# Call API to merge the pages | |
response = pdf_api.post_append_document(file_name, **opts) | |
# render response code in console | |
print(response) |
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
This Gist contains code snippets related PDF merge using Python SDK |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment