How to convert markdown to PDF offline with Pandoc Converter

featured Image

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

Windows

Mac Os

Linux

Using Pandoc, we can convert a markdown file into pdf, Docx, HTML, and many other formats. More details https://pandoc.org/index.html

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 (post.md) to a PDF document, we will use the following command

pandoc -s -o document.pdf post.md

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: article1.md and article2.md.

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

pandoc -s -o document.pdf article1.md article2.md

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

Related Posts

git commands with example

Top 40 Git commands with Examples

GitHub has become an essential tool for developers to manage, store, and collaborate with other developers on software projects. With its simple powerful git-based version control system, GitHub allows users…

Read more
Check GitHub Account in the Terminal

Check GitHub Account in the Terminal

GitHub is an integral tool for developers to store, manage, and collaborate on software projects with other developers. And as we work more and more in the command line it…

Read more
featured Image

How to make list of objects in Netlify CMS using list and object Widget

Here in this Netlify CMS tutorial we will how easily we can make a list of objects using list and object widgets. This will allow us to add multiple objects…

Read more

Leave a Reply

Your email address will not be published. Required fields are marked *