Convert PDF to POTX in Python

Import PDF pages and save them as a reusable PowerPoint Open XML presentation template with Aspose.Slides for Python via Java.

Convert PDF to POTX in Python

Aspose.Slides for Python via Java can import PDF pages as slides and save the resulting presentation as a POTX file. POTX is the PowerPoint Open XML presentation template format and can be used as the basis for new presentations. The conversion does not require Microsoft PowerPoint or a PDF viewer.

Convert PDF to POTX using Python

Create an empty Presentation, remove its default slide, and call addFromPdf to import the PDF pages. Then call save with SaveFormat.Potx to create the POTX presentation template.

Python code for converting PDF to POTX

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

How to convert PDF to POTX in Python

Follow these steps to import a PDF document and save its pages as a reusable PowerPoint POTX presentation template.

  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.Potx to create the POTX presentation template.