Need to set up conversion between PDF and PPTX formats in a hurry? Don’t sweat it, this tutorial has got you covered. We’ll be done faster than you can blink.
Pip install the client first.
pip install cloudmersive-convert-api-client
And now to call convert_document_pdf_to_pptx. As you can see in this example, we are using an API instance to make our function call.
from __future__ import print_functionimport timeimport cloudmersive_convert_api_clientfrom cloudmersive_convert_api_client.rest import ApiExceptionfrom pprint import pprint# Configure API key authorization: Apikeyconfiguration = cloudmersive_convert_api_client.Configuration()configuration.api_key['Apikey'] = 'YOUR_API_KEY'# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed# configuration.api_key_prefix['Apikey'] = 'Bearer'# create an instance of the API classapi_instance = cloudmersive_convert_api_client.ConvertDocumentApi(cloudmersive_convert_api_client.ApiClient(configuration))input_file = '/path/to/file' # file | Input file to perform the operation on.try:# Convert PDF to PowerPoint PPTX Presentationapi_response = api_instance.convert_document_pdf_to_pptx(input_file)pprint(api_response)except ApiException as e:print("Exception when calling ConvertDocumentApi->convert_document_pdf_to_pptx: %s\n" % e)
Just like that, my friends, we are finished. Almost too easy, right? Well, if you would like more quickly implemented features like this, take a browse through the documentation for the rest of this library. There are over 200 more functions in there, ready to save you a ton of time.