Convert PDF to POTM in Python
Import PDF pages and save them in the PowerPoint POTM macro-enabled template format with Aspose.Slides for Python via Java.
Convert PDF to POTM in Python
Aspose.Slides for Python via Java can import PDF pages as slides and save the resulting presentation as a POTM file. POTM is the macro-enabled PowerPoint Open XML template format. Because PDF documents do not contain VBA projects, the conversion transfers the page content but does not create macros.
Convert PDF to POTM using Python
Create an empty Presentation, remove its default slide, and call addFromPdf to import the PDF pages. Then call save with SaveFormat.Potm to create the POTM file.
Python code for converting PDF to POTM
presentation = Presentation()
try:
presentation.getSlides().removeAt(0)
presentation.getSlides().addFromPdf("document.pdf")
presentation.save("presentation.potm", SaveFormat.Potm)
finally:
presentation.dispose()
How to convert PDF to POTM in Python
Follow these steps to import a PDF document and save its pages in the PowerPoint POTM macro-enabled template format.
Install Aspose.Slides for Python via Java .
Configure the package and start the Java Virtual Machine in your application.
Import the PDF pages by calling
addFromPdfon the presentation’s slide collection.Call
savewithSaveFormat.Potmto create the POTM file.
Convert PDF to Other Supported Formats
You can also convert PDF documents to other supported file formats.