Convert Microsoft Word Document 'inputdocx' to PDF via LibreOffice Writer

Took me some time to get this right so I'm happy to share this!

Convert Ms Word document 'input.docx' to pdf via LibreOffice Writer.kmmacros (1.7 KB)


BTW: Not sure if Pandoc allows docx to pdf conversion too...

macOS Big Sur 11.7.4
LibreOffice 7.5.0.3

2 Likes

FWIW pandoc can indeed write out to PDF at the command line:

Pandoc - Creating a PDF

but, on this system at least, doing that from a Keyboard Maestro Execute Shell Script action seems to get frustrated by sandboxing restraint of process spawning when pandoc internally delegates the PDF generation to Latex.

In short, your technique seems a good match for Keyboard Maestro workflows.

I would have to compare the quality of the pdfs that Pandoc creates with that of LibreOffice.

BTW: My whole workflow to convert a folder with docx files to 1 pdf for reference now is:

Merge DOCX Files in TO_MERGE folder on Desktop to REF.PDF.kmmacros (7.5 KB)

FWIW, you can take a look at this for another option (using Pandoc):