In this post, we will see how to convert a markdown app to a pdf file with the Pandoc conversion tool.

Pandoc is an open-source document conversion tool that is used to convert files from one markup format to another.

Pandoc is available for Windows, Mac, and Linux.

Download Links for Pandoc


Mac Os


Using Pandoc, we can convert a markdown file into pdf, Docx, HTML, and many other formats. More details

Here, we will just convert a markdown file to pdf and even see how we can merge two markdown files together.

Convert markdown to PDF with Pandoc

To convert a markdown file ( to a PDF document, we will use the following command

pandoc -s -o document.pdf

So, this command will generate a PDF document named document.pdf as an output.

Merge two markdown files into one pdf document using Pandoc

We can also use pandoc to merge files too. Suppose we have two markdown files: and

So to convert it into one pdf document, we will use the command:

pandoc -s -o document.pdf

Pandoc will merge and generate the document.pdf as the output in your directory.

So this is a very easy way to convert a markdown document to pdf offline using the command line in your windows, macOS, and Linux operating system.

Related Topics:

How to convert markdown files to PDF in VSCode

💾 Recommended Articles