Asked • 04/23/19

How to convert a .pptx to .pdf using Python?

I have been looking to convert a .pptx file to a .pdf file through a Python script for several hours but nothing seems to be working. **What I have tried:** I have tried 1) [this script][1] which calls windows32.client, and 2) [unoconv][2], but none of them seem to be working for me. **Problems encountered:** Using script from first option throws up an error (`com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2147024894), None)`), whereas in second option Python can't seem to recognize `unoconv` even after installing it using pip. I also saw some recommended [Pandoc][3], but I can't understand how to use it for Python. **Versions I am using:** Python 2.7.9, Windows 8.1 [1]: http://odetocode.com/blogs/scott/archive/2013/06/26/convert-a-directory-of-PowerPoint-slides-to-pdf-with-python.aspx [2]: http://dag.wiee.rs/home-made/unoconv/ [3]: http://pandoc.org/scripting.html

1 Expert Answer

By:

Yacine F. answered • 03/27/20

Tutor
New to Wyzant

I Will Make Easy it For You

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.