Convert PDF to PPTM in Python
Import PDF pages and save them in the PowerPoint Macro-Enabled Presentation format with Aspose.Slides for Python via Java.
Convert PDF to PPTM in Python
Aspose.Slides for Python via Java can import PDF pages as slides and save the resulting presentation as a PPTM file. PPTM is the PowerPoint Macro-Enabled Presentation format; the conversion creates a PPTM container but does not add macros to the imported content. Microsoft PowerPoint and a PDF viewer are not required.
Convert PDF to PPTM using Python
Create an empty Presentation, remove its default slide, and call addFromPdf to import the PDF pages. Then call save with SaveFormat.Pptm to create the PPTM presentation.
Python code for converting PDF to PPTM
presentation = Presentation()
try:
presentation.getSlides().removeAt(0)
presentation.getSlides().addFromPdf("document.pdf")
presentation.save("presentation.pptm", SaveFormat.Pptm)
finally:
presentation.dispose()
How to convert PDF to PPTM in Python
Follow these steps to import a PDF document and save its pages as a PowerPoint PPTM presentation.
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.Pptmto create the PPTM presentation.
Convert PDF to Other Supported Formats
You can also convert PDF documents to other supported file formats.