Search code examples
pythonpython-3.7document-conversion

How to convert docx to pdf using python3?


I want to display a preview of files uploaded by a users. For this reason, I have to convert docx-files to pdf using python 3.7.

When looking for a library to do the job I found the following:

  • pdfminer, but it only supports python 2.7
  • comtypes, but it is a library for Windows only

Are there any other alternatives?


Solution

  • Yes. You might want to have a look at pandoc.