Search code examples
pythoncommand-linelibreofficeopenoffice.org

Use LibreOffice / OpenOffice to convert docx to pdf


i want to use LibreOffice / OpenOffice commande line to convert docx file to pdf file, but i'm struggling to use these tool, Is there anyone who knows how to use LibreOffice / OpenOffice commande line ?.

Please, If there's any suggestion, do not hesitate.

Thank You !


Solution

  • This may work.

    soffice --convert-to pdf some.docx --headless
    

    (I've only tried it with .odt files myself, but fingers crossed.)