How to Convert ODP to PPTX in Python

Your life is about to get a whole lot easier. That’s because I’m going to show you the ultra-fast way to convert your Open Document Presentation (ODP) files into PowerPoint PPTX’s, negating the hours you would normally have to dump into getting this functionality. What’s the secret behind this speed? A Cloudmersive API. Let’s see how to get it running.

First we install the client. The following command will take care of that with pip install.

pip install cloudmersive-convert-api-client

Now we can move on to our function call, as you see below:

from __future__ import print_functionimport timeimport cloudmersive_convert_api_clientfrom 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 ODP Presentation to PPTXapi_response = api_instance.convert_document_odp_to_pptx(input_file)pprint(api_response)except ApiException as e:print("Exception when calling ConvertDocumentApi->convert_document_odp_to_pptx: %s\n" % e)

And now you’re done! Man, that was fast. If you have more conversion, validation, or editing needs, the rest of this library is going to be your best friend.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.