How to convert from a Markdown file, to PDF

Akshar Raaj picture Akshar Raaj · Jul 13, 2013 · Viewed 86.7k times · Source

I have a Markdown file which I wish to convert to PDF so that I can upload it on Speakerdeck. I am using Pandoc to convert from markdown to PDF.

My problem is I can't specify what content should go on what page of the PDF, because Markdown doesn't provide any feature like that.

e.g. Markdown:

###Hello
* abc
* def

###Bye
* ghi
* jkl

Now I want Hello to be one slide and Bye to be on another slide on Speakerdeck. So, I will need them to be on different pages in the PDF that I generate using Pandoc.

But both Hello and Bye gets on the same page in the PDF.

Not sure how I can accomplish this. Any help greatly appreciated.

Answer

oori picture oori · Jun 22, 2016

2016 update:

NPM module: https://github.com/alanshaw/markdown-pdf
Has Command line interface: https://github.com/alanshaw/markdown-pdf#usage

npm install -g markdown-pdf
markdown-pdf <markdown-file-path>

Or, Online service: http://markdown2pdf.com