How to convert markdown to PDF offline with Pandoc Converter

This post will show 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 straightforward 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

Easy Way to add Emoji in markdown with VS Code

How to write comments in a Markdown File

How to do text highlight in markdown

How to underline in markdown

Scroll to Top