# Convert PDF to PPTM in Python

> Convert PDF files to PPTM presentations in Python. Use the Aspose.Slides Python API to import PDF pages and save them in macro-enabled PowerPoint format.

Source: https://products.aspose.com/slides/python-net/conversion/pdf-to-pptm/
Updated: 2026-08-11



## Convert PDF to PPTM in Python

[*Aspose.Slides for Python via .NET*](/slides/python-net/) lets you convert PDF files to PPTM presentations programmatically. The API imports each PDF page as a slide with `SlideCollection.add_from_pdf`, then writes the presentation in macro-enabled PowerPoint format with `SaveFormat.PPTM`.

The conversion requires no Microsoft PowerPoint, Adobe Acrobat, or other presentation software. The PPTM container supports VBA projects, but importing a PDF does not create macros. See the [presentation import guide](https://docs.aspose.com/slides/python-net/import-presentation/) for more details.

Install the library from [PyPI](https://pypi.org/project/aspose-slides/) by using the following command:

### Console/Terminal

```console
pip install aspose-slides
```

## How to Convert PDF to PPTM in Python

Follow these steps to convert a PDF file to PPTM using Python.

Create a `Presentation` and remove its default blank slide.

Import the source PDF by using `SlideCollection.add_from_pdf`.

Save the presentation by using `Presentation.save` with `SaveFormat.PPTM`.

## System Requirements

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

- Microsoft Windows, macOS, or 64-bit Linux (see the [system requirements](https://docs.aspose.com/slides/python-net/system-requirements/)).
- Python 3.5 or later.
- Aspose.Slides for Python via .NET installed in your environment.

### This sample code shows how to convert PDF to PPTM in Python

```python
with slides.Presentation() as presentation:
    presentation.slides.remove_at(0)
    presentation.slides.add_from_pdf("document.pdf")
    presentation.save("presentation.pptm", slides.export.SaveFormat.PPTM)
```

## Save PDF as PPTM in Python

Import the PDF pages with `SlideCollection.add_from_pdf`, then save the presentation with `SaveFormat.PPTM`.

## Other Supported Conversions

- [PDF TO BMP](/slides/python-net/conversion/pdf-to-bmp/) — Bitmap Image
- [PDF TO EMF](/slides/python-net/conversion/pdf-to-emf/) — Enhanced Metafile Format
- [PDF TO FODP](/slides/python-net/conversion/pdf-to-fodp/) — OpenDocument Flat XML Presentation
- [PDF TO GIF](/slides/python-net/conversion/pdf-to-gif/) — Graphics Interchange Format
- [PDF TO HTML](/slides/python-net/conversion/pdf-to-html/) — Hypertext Markup Language
- [PDF TO JPG](/slides/python-net/conversion/pdf-to-jpg/) — JPEG Image
- [PDF TO ODP](/slides/python-net/conversion/pdf-to-odp/) — OpenDocument Presentation
- [PDF TO OTP](/slides/python-net/conversion/pdf-to-otp/) — OpenDocument Presentation Template
- [PDF TO PNG](/slides/python-net/conversion/pdf-to-png/) — Portable Network Graphics
- [PDF TO POT](/slides/python-net/conversion/pdf-to-pot/) — PowerPoint 97-2003 Template
- [PDF TO POTM](/slides/python-net/conversion/pdf-to-potm/) — Macro-Enabled PowerPoint Template
- [PDF TO POTX](/slides/python-net/conversion/pdf-to-potx/) — PowerPoint Open XML Template
- [PDF TO PPS](/slides/python-net/conversion/pdf-to-pps/) — PowerPoint 97-2003 Slide Show
- [PDF TO PPSM](/slides/python-net/conversion/pdf-to-ppsm/) — Macro-Enabled PowerPoint Slide Show
- [PDF TO PPSX](/slides/python-net/conversion/pdf-to-ppsx/) — PowerPoint Open XML Slide Show
- [PDF TO PPT](/slides/python-net/conversion/pdf-to-ppt/) — PowerPoint 97-2003 Presentation
- [PDF TO PPTX](/slides/python-net/conversion/pdf-to-pptx/) — PowerPoint Open XML Presentation
- [PDF TO SVG](/slides/python-net/conversion/pdf-to-svg/) — Scalable Vector Graphics
- [PDF TO SWF](/slides/python-net/conversion/pdf-to-swf/) — Shockwave Flash Format
- [PDF TO TIFF](/slides/python-net/conversion/pdf-to-tiff/) — Tagged Image File Format
- [PDF TO XPS](/slides/python-net/conversion/pdf-to-xps/) — XML Paper Specification
