Convert PDF to Animated GIF in Python
Import PDF pages and export them as a single animated GIF with Aspose.Slides for Python via Java.
Convert PDF to GIF in Python
Aspose.Slides for Python via Java can import PDF pages as slides and export them as frames in a single animated GIF. The conversion does not require Microsoft PowerPoint or a PDF viewer.
Convert PDF to GIF using Python
Create an empty Presentation, remove its default slide, and call addFromPdf to import the PDF pages. Then call save with SaveFormat.Gif to create an animated GIF.
Python code for converting PDF to animated GIF
presentation = Presentation()
try:
presentation.getSlides().removeAt(0)
presentation.getSlides().addFromPdf("document.pdf")
presentation.save("presentation.gif", SaveFormat.Gif)
finally:
presentation.dispose()
How to convert PDF to animated GIF in Python
Follow these steps to import a PDF document and export its pages as a single animated GIF.
Install Aspose.Slides for Python via Java .
Configure the package and start the Java Virtual Machine in your application.
Import the PDF pages by calling
addFromPdfon the presentation’s slide collection.Call
savewithSaveFormat.Gifto generate the animated GIF.
Convert PDF to Other Supported Formats
You can also convert PDF documents to other supported file formats.