Markdown is ideal for writing, but you often need to send a finished PDF: a report, a README for a client, meeting notes, a CV. There is no single built-in "Save as PDF" in Markdown itself, because the format has no page layout. A converter has to render the text and then paginate it. Here are four dependable routes, from quickest to most controlled.
Method 1: Export from a browser editor
For a simple document, the fastest path is to open the file in a tool with PDF export. In Docento's Text & Markdown Editor, open your .md file and click Export PDF. The PDF is generated in your browser, so the document is not uploaded anywhere.
This route supports headings, paragraphs, bullet, numbered and task lists, quotes, code blocks, horizontal rules and links. The built-in export uses standard PDF fonts, so characters outside the Latin-1 range may be replaced with a question mark, and inline bold and italics are not styled within a line. For anything more elaborate, use one of the methods below.
Method 2: Pandoc
Pandoc is the standard command-line document converter, and it handles Markdown very well. The simplest command is:
pandoc notes.md -o notes.pdf
Pandoc does not draw PDFs itself. By default it converts to LaTeX and calls a PDF engine, so you need a TeX installation such as TeX Live or MiKTeX. You can choose a different engine with --pdf-engine, for example xelatex for good Unicode and font support, or an HTML-based engine such as weasyprint if you prefer CSS styling.
Pandoc gives you the most control: tables of contents, numbered sections, citations, templates, page margins and metadata. The trade-off is setup effort.
Method 3: A code editor or note app
Many editors can export or print the rendered preview. Visual Studio Code, for example, can do this through a Markdown extension, and several note-taking apps have an Export as PDF command. Quality varies with the app, but this is convenient if you already write in it.
Method 4: Convert to HTML, then print to PDF
Any Markdown tool can produce HTML, and every browser can print a page to PDF:
- Render the Markdown to HTML (a preview pane will do).
- Open it in a browser and choose Print.
- Select Save as PDF as the printer.
- Adjust margins, page size and headers in the print dialog.
You can control the look with a stylesheet, including a @media print rule for page breaks. This route gives good typography with no extra software.
Choosing between them
| Need | Best route |
|---|---|
| Quick, private, simple document | Browser editor export |
| Reports, books, citations, templates | Pandoc |
| Already working inside an editor | The editor's export |
| Custom styling with CSS | HTML then print |
Things to check in the PDF
- Tables that overflow the page width, which is common with wide tables.
- Code blocks with long lines that get cut off or wrap awkwardly.
- Images that are missing because a relative path did not resolve.
- Links: confirm they are clickable, not just underlined.
- Page breaks that strand a heading at the bottom of a page.
- Fonts for non-Latin text, which need an engine and font that cover the characters.
After you have a PDF
A PDF made from Markdown is an ordinary PDF. You can compress it, merge it with other documents, or sign it. Docento's mobile app also lets you export a Markdown note and open it directly in the sign and annotate workspace.
Takeaway
For a quick, private conversion use a browser export; for polished or complex documents use Pandoc or print from HTML. Whichever route you choose, open the PDF and check tables, images and page breaks before you send it.