Personal tools
Contact Us 24/7 1 866.SIX FEET
Sections

Skip to content. | Skip to navigation

Home > Blog > Markdown to PDF in one command line

Markdown to PDF in one command line

written by Calvin Hendryx-Parker on 05/19/09
— filed under: , , ,

We have started responding to many documents now using plain text files since it is very easy to manage and to collaborate with other team members. Now, what if you want to send off a professional looking formatted structured document with a table of contents. You also want it to be in a common format so that others can annotate on it or send you feedback. PDF is perfect for this, but how do you get your very functional markdown to a very pretty PDF presentation?

Markdown.pl ~/Desktop/mytextfile.markdown | SmartyPants.pl | htmldoc --book --footer . -f output.pdf -

Enjoy! As a bonus I included SmartyPants, which is also by the creator of Markdown and it gives you some nice typographical elements just as smart quotes and em-dashes. Also, I would check out the documentation on htmldoc, it is pretty powerful and can even embed background images and custom headers and footers.

Posted by Dave on 11/09/11
Here is a tool for Windows that converts MultiMarkdown to PDF:
http://code.google.com/p/mmd2pdf
Add comment

You can add a comment by filling out the form below. Plain text formatting.

(Required)
Blog Authors
 
Call Us 1 866.SIX FEET
Sections
1 866.SIX FEET

© 2012 Six Feet Up, Inc. All rights reserved.