# Convert PDF to POTM in Python

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

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



## Convert PDF to POTM in Python

[*Aspose.Slides for Python via .NET*](/slides/python-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](https://products.aspose.app/slides/conversion).

You can install the library from [PyPI](https://pypi.org/project/aspose-slides/) using the following pip command:

### Console/Terminal

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

## How to Convert PDF to POTM in Python

These are the steps to convert a PDF file to POTM 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.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](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 PDF to POTM Python Conversion

```python
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)
```

## Save PDF as POTM in Python

Use the [free conversion app](https://products.aspose.app/slides/conversion) to see the PDF-to-POTM workflow in your browser.

## 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 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 PPTM](/slides/python-net/conversion/pdf-to-pptm/) — Macro-Enabled PowerPoint 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
