Convert PPTM to Animated GIF in Python

Export a macro-enabled PowerPoint presentation as a single animated GIF with Aspose.Slides for Python via Java.

Convert PPTM to GIF in Python

Aspose.Slides for Python via Java can load a macro-enabled PowerPoint presentation (.pptm) and export it as an animated GIF. The output file presents the slides as animation frames and can reproduce supported slide transitions. The exported GIF does not contain the PPTM file’s VBA project, and Microsoft PowerPoint is not required.

Convert PPTM to GIF using Python

Create a Presentation from the source PPTM file, then call save with SaveFormat.Gif to generate an animated GIF.

Python code for converting PPTM to animated GIF

presentation = Presentation("presentation.pptm")
try:
    presentation.save("presentation.gif", SaveFormat.Gif)
finally:
    presentation.dispose()

How to convert PPTM to animated GIF in Python

Follow these steps to export a PowerPoint PPTM presentation as a single animated GIF.

  1. Install Aspose.Slides for Python via Java .

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

  3. Open the source PPTM file with Presentation.

  4. Call save with SaveFormat.Gif and a .gif output path.