Skip to content

Convert markdown md files to pdf

October 21, 2022 | 12:22 AM

Convert md files to pdf

On Ubuntu and many other platforms it is super easy to install pandoc.

Install on Ubuntu

sudo apt install pandoc

Convert a file

Syntax is rather straight forward:

pandoc example.md --pdf-engine= <<engine name>> -o example.pdf

Available engines: pdf-engine must be one of wkhtmltopdf, weasyprint, prince, pdflatex, lualatex, xelatex, latexmk, tectonic, pdfroff, context

Install the engine with apt install, if not already installed on the system.

pandoc --help provides a cli help menu.

Additional info and downloads

https://pandoc.org/installing.html