# Convert PPTM to PDF in Python

> Convert PPTM files to PDF documents in Python with Aspose.Slides for Python via Java.

Source: https://products.aspose.com/slides/python-java/conversion/pptm-to-pdf/
Updated: 2026-07-22



## Convert PPTM to PDF in Python

[**Aspose.Slides for Python via Java**](/slides/python-java/) can convert a macro-enabled PowerPoint presentation (`.pptm`) to a PDF document without Microsoft PowerPoint. PDF output preserves the rendered appearance of supported slide content for consistent sharing, printing, and archiving. Because PDF is a fixed-layout document format, the output does not contain the source presentation's VBA project or interactive slide behavior.

For a standard conversion, load the PPTM file with `Presentation` and call `save` with `SaveFormat.Pdf`. You can also use `PdfOptions` when you need to control settings such as compliance, image quality, or hidden-slide handling.

## Convert PPTM to PDF using Python

Create a `Presentation` from the source PPTM file, then call `save` with `SaveFormat.Pdf`.

### Python tutorial for converting PPTM into PDF

```python
presentation = Presentation("presentation.pptm")
try:
    presentation.save("presentation.pdf", SaveFormat.Pdf)
finally:
    presentation.dispose()
```

## How to convert PPTM to PDF in Python

Follow these steps to export a PowerPoint PPTM presentation as a PDF document.

Install [**Aspose.Slides for Python via Java**](https://docs.aspose.com/slides/python-java/installation/).

Configure the package and start the Java Virtual Machine in your application.

Open the source PPTM file with `Presentation`.

Call `save` with `SaveFormat.Pdf` and a `.pdf` output path.

## Convert PPTM to Other Supported Formats

- [PPTM TO PPTX](/slides/python-java/conversion/pptm-to-pptx/)
- [PPTM TO PPT](/slides/python-java/conversion/pptm-to-ppt/)
- [PPTM TO HTML](/slides/python-java/conversion/pptm-to-html/)
- [PPTM TO PNG](/slides/python-java/conversion/pptm-to-png/)
- [PPTM TO BMP](/slides/python-java/conversion/pptm-to-bmp/)
- [PPTM TO JPG](/slides/python-java/conversion/pptm-to-jpg/)
- [PPTM TO FODP](/slides/python-java/conversion/pptm-to-fodp/)
- [PPTM TO GIF](/slides/python-java/conversion/pptm-to-gif/)
- [PPTM TO ODP](/slides/python-java/conversion/pptm-to-odp/)
- [PPTM TO OTP](/slides/python-java/conversion/pptm-to-otp/)
- [PPTM TO POT](/slides/python-java/conversion/pptm-to-pot/)
- [PPTM TO POTM](/slides/python-java/conversion/pptm-to-potm/)
- [PPTM TO POTX](/slides/python-java/conversion/pptm-to-potx/)
- [PPTM TO PPS](/slides/python-java/conversion/pptm-to-pps/)
- [PPTM TO PPSM](/slides/python-java/conversion/pptm-to-ppsm/)
- [PPTM TO PPSX](/slides/python-java/conversion/pptm-to-ppsx/)
- [PPTM TO SVG](/slides/python-java/conversion/pptm-to-svg/)
- [PPTM TO TIFF](/slides/python-java/conversion/pptm-to-tiff/)
