Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This Gist contains code snippets regarding the conversion of PDF file to PPTX format using Aspose.PDF Cloud SDK for Python
# For more examples, please visit https://github.com/aspose-pdf-cloud/aspose-pdf-cloud-python
def PDF2PPTX():
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 document
input_file = 'URL2PDF.pdf'
#resultant PPTX file name
resultant_file = 'Resultant.pptx'
# Convert PDF file to PPTX format and save resultant file to Cloud storage
response = pdf_api.put_pdf_in_request_to_pptx(out_path = resultant_file,separate_images=False, slides_as_images=False, file = input_file)
# print message in console (optional)
print('PDF successfully converted to PPTX 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 PPTX format using Aspose.PDF Cloud SDK for Python
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment