Please follow the steps specified below to convert the PDF files to PDF/A format using Aspose.PDF Cloud SDK for Python.
For more information, please visit the following blog Convert PDF to PDF/A using Python
Please follow the steps specified below to convert the PDF files to PDF/A format using Aspose.PDF Cloud SDK for Python.
For more information, please visit the following blog Convert PDF to PDF/A using Python
def PDF2PDFA(): | |
try: | |
#Client credentials | |
client_secret = "1c9379bb7d701c26cc87e741a29987bb" | |
client_id = "bbf94a2c-6d7e-4020-b4d2-b9809741374e" | |
#initialize PdfApi client instance using client credetials | |
pdf_api_client = asposepdfcloud.api_client.ApiClient(client_secret, client_id) | |
# create PdfApi instance while passing PdfApiClient as argument | |
pdf_api = PdfApi(pdf_api_client) | |
#source PDF file | |
input_file = 'awesomeTable.pdf' | |
#resultant PDF/A document | |
resultant_file = 'Converted.pdf' | |
# convert PDF to PDF/A_1a format and save output in Cloud storage | |
response = pdf_api.put_pdf_in_storage_to_pdf_a(name = input_file, out_path= resultant_file, type='PDFA1A') | |
# print message in console (optional) | |
print('PDF successfully converted to PDF/A format !') | |
except ApiException as e: | |
print("Exception while calling PdfApi: {0}".format(e)) | |
print("Code:" + str(e.code)) | |
print("Message:" + e.message) |
This Gist contains code snippets regarding the conversion of PDF file to PDF/A format using Aspose.PDF Cloud SDK for Python |