Common problems and fixes
An image is missing
Images on other websites are not fetched, so your document never leaves your device. PNG and JPEG images embedded as data: URIs or hosted on this site are included; anything else appears as an "Image not included" note with its alt text. Paths such as images/photo.png point to a file next to your .md file, which the browser can't see, so embed the image or paste it as a data URI first.
Math shows as TeX
$...$ and $$...$$ render as typeset math in the preview, but the PDF writes the TeX source in a monospace font. If you need typeset equations, use the Print / Save as PDF button, which prints the preview as you see it.
A long code block splits across pages
Code blocks under about 45 lines are kept together on one page. Longer blocks can break across pages, so split a very long listing if you want each part to stay whole.
Text in another language looks wrong
Cyrillic, Greek, Arabic, Hebrew, Hindi and the other Indic scripts, Thai, Chinese, Japanese, Korean and emoji each use their own open-source font, downloaded from this site the first time a document needs it.
Other ways to convert Markdown to PDF
- Pandoc.
pandoc notes.md -o notes.pdfworks well for long documents and typeset math, but it needs a LaTeX engine installed as well as Pandoc. - VS Code. The Markdown PDF extension adds an "Export (pdf)" command to the editor.
- Your browser's print dialog. The Print / Save as PDF button on this page prints the rendered preview with a clean layout.
This page is for when you want a clean PDF quickly, on any computer, without installing anything or uploading the file. To read a file first, open it in the MD viewer; to go the other way, use the PDF to Markdown converter.