0

I tried this docx2pdf library in windows.but in linux I'm facing the error as

NotImplementedError: docx2pdf is not implemented for linux as it requires Microsoft Word to be installed

any alternative library to convert docx to pdf using python without using subprocess(terminal)

and also I have tried this code (.doc to pdf using python) not worked for me I got this error on linux (ImportError: cannot import name COMError in python)

I tried

from docx2pdf import convert

convert("myDoc.docx")

I got

File /opt/conda/lib/python3.10/site-packages/docx2pdf/__init__.py:108, in convert(input_path, output_path, keep_active)
    106     return windows(paths, keep_active)
    107 else:
--> 108     raise NotImplementedError(
    109         "docx2pdf is not implemented for linux as it requires Microsoft Word to be installed"
    110     )

NotImplementedError: docx2pdf is not implemented for linux as it requires Microsoft Word to be installed
Lokeshwar G
  • 136
  • 6

0 Answers0