How to Convert ODP to PPTX in Python

Cloudmersive
2 min readJul 3, 2020

--

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 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 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.

--

--

Cloudmersive
Cloudmersive

Written by Cloudmersive

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

No responses yet