In this article, you will learn how to convert PowerPoint PPT/PPTX presentations using Python. For this, we will use “Aspose.Slides Java for Python”, a new project for Python developers. The project is aimed to provide useful examples for Python developers who want to utilize Aspose.Slides for Java API in their Python applications to create and manipulate PowerPoint presentations.

Python PowerPoint PPTX/PPT to PDF Converter

Please check the links below to find instructions on downloading, installing, and using Aspose.Slides Java for Python.

OR

You can download the latest version from:

Note: Aspose provides a simple, free online PowerPoint editor.

Convert PowerPoint PPTX/PPT to PDF in Python

The following steps show how to convert a PowerPoint PPTX/PPT presentation to PDF using Python:

  • Load a presentation using Presentation class.
  • Specify the output format as PDF.
  • Convert presentation to PDF using Presentation.save() method.

The following code sample shows how to convert a PowerPoint presentation to PDF.

# Instantiate a Presentation object that represents a PPTX file
pres = self.Presentation(self.dataDir + "Aspose.pptx")
# Saving the PPTX presentation to Pdf format
save_format = self.SaveFormat
pres.save(self.dataDir + "Aspose.pdf", save_format.Pdf)
print "Document has been converted, please check the output file.

Learn More

Aspose.Slides Java for Python Documentation is available to guide developers to get familiar with the specific resources and operations within the Aspose.Slides Java for Python.

Get a Free API License

You can get a free temporary license in order to use the API without evaluation limitations.

Conclusion

IIn this article, you have learned how to convert the PowerPoint PPTX or PPT presentations to PDF using Python. You can simply install the API and integrate the provided code sample to enrich your Python applications with PPTX/PPT to PDF conversion.

See Also

Create, Edit, Convert PowerPoint PPT/PPTX using Python