How to Convert Presentation to PDF using Python

This simple topic is about how to convert Presentation to PDF using Python by providing details and configuring the environment to execute the sample code. In order to convert PPTX to PDF Python based code using simple API calls can be used. The application can be tested in any operating system configured with .NET Framework including MS Windows, Linux or macOS.

Steps to Create PowerPoint with Python

  1. Setup the environment to use Aspose.Slides for Python via .NET in your application
  2. Include the Aspose.Slides namespace in your project for exporting PPTX to PDF
  3. Create an instance of the Presentation class to load the source presentation
  4. Create a PdfOptions class object to set the output PDF options
  5. Set the desired PDF access password
  6. The Save method in Python converts PPTX to PDF

The above-mentioned steps in Python convert PPT to PDF files using a simple API interface. We will initiate the process by creating the Presentation class object to load the source presentation file which can be in ODP, PPT, PPTX, POT or POTX format. The PdfOptions class instance will be used to ensure the security of the output PDF by setting a password. Finally, the converted PDF will be saved on the disk using the Save method.

Code to Create PPT using Python

By using Python PPT to PDF converter application is developed. The PdfOptions class exposes different settings like Compliance, JpegQualiy, ImageTransparentColor, SufficientResolution and SaveMetafilesAsPng to further customize the output PDF.

In this article, we witnessed how easily using Python PPTX to PDF converter application can be developed. If you want to create the presentation file using Python, refer to the article on how to create PPT using Python.

 English