Convert PDF to POTM in Python

Powerful PowerPoint Python library for converting PDF to POTM

Convert PDF to POTM in Python

Aspose.Slides for Python via .NET lets you convert PDF files to POTM presentations programmatically. The API imports each PDF page as a slide with SlideCollection.add_from_pdf, then writes the presentation in macro-enabled PowerPoint template format.

The conversion requires no Microsoft PowerPoint, Adobe Acrobat, or other presentation software. You can also try the PDF-to-POTM workflow in the online conversion app .

You can install the library from PyPI using the following pip command:

Console/Terminal

pip install aspose-slides

Save PDF as POTM in Python

Use the free conversion app to see the PDF-to-POTM workflow in your browser.

This sample code shows PDF to POTM Python Conversion

with slides.Presentation() as presentation:
    presentation.slides.remove_at(0)
    presentation.slides.add_from_pdf("document.pdf")
    presentation.save("presentation.potm", slides.export.SaveFormat.POTM)

How to Convert PDF to POTM in Python

These are the steps to convert a PDF file to POTM using Python.

  1. Create a Presentation and remove its default blank slide.
  2. Import the source PDF by using SlideCollection.add_from_pdf.
  3. Save the presentation by using Presentation.save with SaveFormat.POTM.

System Requirements

Before running the Python conversion example, make sure your environment meets these requirements.

  • A supported Windows, Linux, or macOS environment; see System Requirements .
  • Python 3.5 or later.
  • Aspose.Slides for Python via .NET installed in your environment.