Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mschultheiss83/5417651 to your computer and use it in GitHub Desktop.
Save mschultheiss83/5417651 to your computer and use it in GitHub Desktop.
markdown to pdf

How-to generate PDF from Markdown

From: http://kevin.deldycke.com/2012/01/how-to-generate-pdf-markdown/

Gimli Gimli is an utility that was explicitly written with GitHub in mind.

Gimli is written in Ruby, so let's install it the Ruby way:

$ aptitude install rubygems wkhtmltopdf $ gem install gimli

Then we can convert our Markdown file to a PDF. The following will generate a README.pdf file in the current folder:

$ /var/lib/gems/1.8/bin/gimli -f ./README.md

The resulting PDF is really close to how GitHub renders Markdown content on its website. And it solve the bad code block style of Pandoc: http://kevin.deldycke.com/static/uploads/2012/01/gimli-wraping-code-blocks.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment