Markdown to PDF – quick howto for linux users (Ubuntu)

This is a quick howto guide showing how to create beautiful PDF files from Markdown format text files using a single command line in your linux (Ubuntu) terminal. If you need to convert files from one markup format into another, then it can be your swiss-army knife. Many thanks to pandoc creators!

1. Install tools

sudo apt-get install pandoc texlive-latex-base texlive-fonts-recommended texlive-extra-utils texlive-latex-extra

2. Convert Markdown to PDF

$/> pandoc documentation.txt -o documentation.pdf
$/> pandoc README.md -o README.pdf

3. Samples

README.txt
README.pdf

Attachments

2 thoughts on “Markdown to PDF – quick howto for linux users (Ubuntu)

  1. A problem is there, when we convert file into pdf, sometimes one line does not comes to the another line. It cuts from there . How to resolve this issue?

    • I think that it’s kind of formatting issue. I didn’t have such a problem. What is the original text format?

Leave a Comment