# Convert PPTX to PDF in Python

> Convert PPTX presentations to PDF documents in Python with Aspose.Slides for Python via Java.

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



## Convert PPTX to PDF in Python

[**Aspose.Slides for Python via Java**](/slides/python-java/) can load a PPTX presentation and export it as a PDF document. The PDF output retains the presentation's visual layout in a format suitable for sharing, printing, and archiving. The conversion does not require Microsoft PowerPoint.

## Convert PPTX to PDF using Python

Create a `Presentation` from the PPTX file and call `save` with `SaveFormat.Pdf` to generate the PDF document.

### Python code for converting PPTX to PDF

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

## How to convert PPTX to PDF in Python

Follow these steps to export a PPTX 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 PPTX file with `Presentation`.

Call `save` with `SaveFormat.Pdf` to write the PDF document.

## Convert PPTX to Other Supported Formats
