Convert PDF to PPSM in Python

Import PDF pages and save them in the PowerPoint PPSM macro-enabled slide show format with Aspose.Slides for Python via Java.

Convert PDF to PPSM in Python

Aspose.Slides for Python via Java can import PDF pages as slides and save the resulting presentation as a PPSM file. PPSM is the macro-enabled PowerPoint Open XML Show format and is intended to open directly in slide show mode. Because PDF documents do not contain VBA projects, the conversion transfers the page content but does not create macros.

Convert PDF to PPSM using Python

Create an empty Presentation, remove its default slide, and call addFromPdf to import the PDF pages. Then call save with SaveFormat.Ppsm to create the PPSM slide show.

Python code for converting PDF to PPSM

presentation = Presentation()
try:
    presentation.getSlides().removeAt(0)
    presentation.getSlides().addFromPdf("document.pdf")
    presentation.save("presentation.ppsm", SaveFormat.Ppsm)
finally:
    presentation.dispose()

How to convert PDF to PPSM in Python

Follow these steps to import a PDF document and save its pages as a PowerPoint PPSM macro-enabled slide show.

  1. Install Aspose.Slides for Python via Java .

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

  3. Import the PDF pages by calling addFromPdf on the presentation’s slide collection.

  4. Call save with SaveFormat.Ppsm to create the PPSM slide show.