Search code examples
pythonpowerpointpython-pptx

convert pptx into PNGs


Is there a way of converting a pptx file into png files for each slide using Python?

I was thinking of converting pptx into pdf and then converting each pages into png but not sure if it is the optimal way.


Solution

  • It's possible on windows using comtypes library. But same cannot be said for unix distributions because comtypes isn't supported in unix. For windows,if you couldn't figure it out:

    https://gist.github.com/littmus/6496277

    There is also python-pptx library but it doesn't have privilege for allowing to take Screenshot (Correct me if I am wrong.) In the meanwhile, this is really interesting question according to me, since there are many threads for the same, if you get it please post the answer over here.