katlab tools/markdown-to-pdf support on Ko-fi

Markdown → PDF Converter

Write or paste Markdown and get a polished, print-ready PDF with a live preview. It supports themes, 11 typefaces, highlighted code, tables, math, images and a clickable table of contents. No watermark, no sign-up.

Everything runs locally in your browser. Nothing is sent to a server.
Colours
Markdown
PDF preview
The preview appears here as you type.

How to convert Markdown to PDF

  1. Type or paste Markdown on the left, drop a .md file onto it, or click sample to see every feature.
  2. Pick a theme, typeface, page size and margins. The preview on the right is the actual PDF, rendered page by page.
  3. Click Download PDF. The file is named after your first heading.

What makes a good Markdown PDF

The PDF is typeset from your Markdown, not screenshotted. Text is real, embedded vector type, so it stays sharp at any zoom, is searchable, and copies cleanly. Headings become PDF bookmarks, links stay clickable, and links to #headings jump within the document. A heading is never left stranded at the bottom of a page, and short code blocks are kept on one page.

Supported Markdown

Images

Drag image files onto the editor or paste one from the clipboard, and a reference like ![photo](photo.png) is inserted for you. JPG, PNG and SVG are embedded as-is; WebP, GIF and other formats are converted to PNG. Images are scaled to fit the page, and an image title (![alt](a.png "Caption")) becomes a caption. Images at remote https:// URLs are deliberately not downloaded, because that would leak your document to other servers. Drop the file in instead.

Is my document uploaded?

No. Parsing, typesetting and the PDF itself are all produced in this page using self-hosted libraries: marked, pdfmake, highlight.js, MathJax and pdf.js for the preview. Your draft is saved in this browser's local storage so a refresh doesn't lose it, and it never leaves your device.

Limitations

Fonts are embedded, so a character missing from the chosen typeface can't be printed. The tool warns you when that happens and names the characters. Colour emoji and Chinese, Japanese or Korean text are not supported. Mermaid diagrams are shown as code. Arbitrary HTML layout is reduced to its text.