index all rss twitter github linkedin email

Álvaro Ramírez

14 November 2018 Converting docx to pdf on macOS

Wanted to convert a docx document to pdf on macOS. Pandoc to the rescue, but first needed pdflatex installed:

pandoc -t latex some.docx -o some.pdf
pdflatex not found. Please select a different --pdf-engine or install pdflatex

Installed pdflatex on macOS with:

brew cask install mactex

Can also use HTML5. Install wkhtmltopdf with:

brew install Caskroom/cask/wkhtmltopdf

Convert with:

pandoc -t html5 some.docx -o some.pdf