How to Convert PPTX to PPT using Python

This brief tutorial is about how to convert PPTX to PPT using Python. It covers all the configuration details, a stepwise procedure, and a runnable sample code to change PPTX to PPT using Python. The application can be used in any of the operating systems like Windows, macOS, and Linux supporting the .NET Core platform and Python.

Steps to Convert PPTX to PPT using Python

  1. Set up your machine environment to use Aspose.Slides for Python via .NET in your application
  2. Include aspose.slides namespace in your project for exporting PPTX to PPT
  3. Open the source presentation from the disk by creating an instance of the Presentation class
  4. The save method converts PPTX to PPT in Python

The aforementioned steps describe the procedure to develop software to transform PPTX to PPT using Python. It can be observed that it is just a matter of a few lines of code to write this application. The process will commence by loading the source PPTX that is loaded into the Presentation class object and in the next step, it is just saved as a PPT file on the disk. You can customize the conversion process by opting for the different options using different constructors while loading the source presentation and also using the different overloaded methods for saving the output presentation document.

Code to Change PPTX to PPT using Python

The above example transforms a PPTX into PPT using Python with the help of simple API calls involving the usage of a single argument constructor of the Presentation class to load the source PPTX file from the disk. There are many other constructor overload options available using parameters like LoadOptions object, a memory stream and the file name in different combinations. The LoadOptions class exposes different properties to set the password, interruption token, load format, and warning callbacks.

This tutorial has walked us through a process to convert PPTX to PPT in Python however, if you want to learn about the process to convert a presentation to PDF, refer to the article on how to convert PowerPoint to PDF using Python.

 English