scanny / python-pptx

Create Open XML PowerPoint documents in Python
MIT License
2.26k stars 498 forks source link

Convert PPTX slide to Image #966

Closed vignesh0710 closed 2 months ago

vignesh0710 commented 2 months ago

Is it possible to convert slides to images

#python-pptx version == 0.6.2
from pptx import Presentation

prs = Presentation(file_path)

for i, slide in enumerate(prs.slides):
    slide.export(img_path)
scanny commented 2 months ago

No. You might be able to manage that somehow with LibreOffice. I think you might have to convert to PDF first and then PDF to image with Ghostscript or something. That's the only way I've heard of folks doing it aside from a Microsoft proprietary or Windows-only solution..