I needed to get a Markdown document in PDF format. Unable to find a good solution, I set off to make a Markdown to PDF conversion utility. About 20 lines of Python later, here we are!
md2pdf: Markdown to PDF
You can download
md2pdf on Github. Installation instructions can be found in the README. Usage is extremely simple:
$ md2pdf my-markdown-document.md
How it was made
This utility is actually pretty silly. It simply serves as a glue between
markdown2, which takes Markdown and produces HTML, and
xhtml2pdf, which takes HTML and produces PDFs. The script uses a system call because the xhtml2pdf interface is non-trivial. Consequently, you're probably better off not using this on a production server.
May 03, 2012