How to convert .md files to PDF
Converting a `.md` file to PDF doesn't need a command line. The browser is the toolchain.
Why this is faster than a CLI
Pandoc + LaTeX requires installing a TeX distribution (~2GB), learning the command line flags, and waiting for each conversion. The browser path takes 10 seconds for the same output for documents that don't need LaTeX-grade math.
If you've already paid the Pandoc install cost, keep using Pandoc. If you haven't, the browser is the cheaper path.
Editor-specific tips
- VS Code - open the .md, Cmd/Ctrl+A, Cmd/Ctrl+C, paste in the converter. See the VS Code guide.
- Obsidian - switch to source mode first (Cmd/Ctrl+E), then select all and copy. Otherwise you copy the rendered output, not the Markdown.
- TextEdit / Notepad - open the .md, select all, copy. Plain text editors are the easiest to copy from.
- Bear / iA Writer / Typora - same flow, all WYSIWYG-ish editors give you the source on copy.
Drag-and-drop is on the roadmap
Eventually you'll be able to drag a .md file onto the converter and it'll load directly. For v1, copy-paste is the path. It takes about three seconds.
FAQ
Can I batch-convert multiple .md files?
Not in v1. The converter is one-document-at-a-time. For batch workflows, the right tool is Pandoc with a shell loop - see the <a href='/pandoc-alternative-markdown-to-pdf'>Pandoc-alternative comparison</a>.
What if my .md file has YAML front-matter?
Front-matter is preserved as text in the body of the document. If you want it to act as cover-page metadata, copy the relevant fields into the Cover section instead.
How big can the .md file be?
Practically: up to ~200 pages of body content. Above that, the live preview slows; the export still works but the user experience degrades.
Related
https://md2document.com/how-to-convert-md-to-pdf/