0

I can install MSoffice word on my server and do this with COM. this is my Python code.

    word = win32com.Dispatch("Word.Application")
    worddoc = word.Documents.Open(doc_name, ReadOnly=1)
    worddoc.SaveAs(pdf_name, FileFormat=17)

But i see Considerations for server-side Automation of Office, said this is at low stability.


And I know the LibreOffice, but it's not reliable. Sometimes it is different from what I see in MSoffice.


I want to know the reliable solution that the pdf looks the same with MSoffice word and must convert at local. So maybe it must depend on MSoffice.

what i need is just as this, not complex automatic. Can I think this is stable? if not how can i make it stable? Or is there a good solution?

  1. Open a invisible word application
  2. Open a doc/docx file.
  3. Save as a pdf.

Sorry for my bad english. I am willing to provide any imformation If you need.Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.