Convert POTM Files to PDF in Python

Render a macro-enabled PowerPoint template as a PDF document with Aspose.Slides for Python via Java.

Convert POTM to PDF in Python

Aspose.Slides for Python via Java can load a macro-enabled POTM file and render it as a PDF document. The PDF preserves the visual layout of the slides in a fixed-layout format; VBA macros and interactive behavior are not included. Microsoft PowerPoint is not required.

Convert POTM to PDF using Python

Create a Presentation from the POTM file, then call save with SaveFormat.Pdf.

Python code for converting POTM to PDF

presentation = Presentation("presentation.potm")
try:
    presentation.save("presentation.pdf", SaveFormat.Pdf)
finally:
    presentation.dispose()

How to convert POTM to PDF in Python

Follow these steps to render a POTM file as a PDF document.

  1. Install Aspose.Slides for Python via Java .

  2. Configure the package and start the Java Virtual Machine in your application.

  3. Open the source POTM file with Presentation.

  4. Call save with SaveFormat.Pdf to create the PDF document.