Converting Word Documents to PDF on Linux
Several tools can convert .doc and .docx files to PDF from the command line. Here’s what works in practice. LibreOffice (most common approach) The standard command is: libreoffice –headless –convert-to pdf –outdir /path/to/output/ /path/to/file.docx This works well on systems with X11 available. However, on truly headless servers, –headless doesn’t fully suppress X11 requirements—LibreOffice will still…
