Why I built PrintMD
I write in Markdown, and getting from there to a PDF I’d happily send someone was more work than it should be. So I built an editor that shows the page as I type and exports PDF, Word and PowerPoint from the same text.
I write in Markdown. Notes, plans, short reports, the odd longer document. Plain text is quick, it diffs well and it never gets in my way. The trouble starts when someone else has to read it.
Most of the time that means a PDF, and getting from Markdown to a PDF that doesn’t look like a text file with a margin is more work than it sounds. Pasting into a word processor loses the structure. A browser’s print dialog gets most of the way, then splits a table across two pages or leaves a heading alone at the foot of a page. The command-line tools are powerful, and many of them want a pile of packages and a LaTeX installation.
I wanted one thing: write Markdown, see the page, press a button, and get a PDF I wouldn’t be embarrassed to send. That became PrintMD.
What it is
PrintMD is a Markdown editor with a live preview and two templates. The preview shows the page in the template’s own type and spacing, so it’s close to what you’ll print; page breaks and the running head and foot only appear in the PDF. Export gives you a PDF, a Word file or a PowerPoint file from the same text.


It’s plain HTML, CSS and JavaScript modules. There’s no build step and no framework, so if you can serve a folder, you can run it. I made that choice early and haven’t regretted it: the whole thing can be read, and changed, by one person.
Where it grew
The first version was an editor and a template. Then I wanted the PDFs to be right rather than nearly right, and that turned into most of the work:
- Fonts are bundled with the app and embedded in the PDF, so it doesn’t depend on what the reader has installed.
- Page breaks follow a few simple rules: a heading stays with the text after it, a table row stays whole where it fits on a page, and a table that runs on repeats its header.
- Page size is a choice for each document, including a custom size, and so is a single long page for things that aren’t really pages.
- A small service on my own computer turns a Markdown file into a PDF with one command, which is how I use it from scripts and from other tools.
Each of those has its own post: print-quality PDFs from a browser, custom sizes, one long page and fit to width, and a PDF service that only runs on your machine.
Why local
PrintMD is happiest on your own machine, and I want to be plain about that. Your documents stay in your browser. The PDF service prints with a browser on your own computer and listens only there. The editor also works hosted, and there it says that running it locally is better. The PDF service won’t run hosted at all.
What next
It’s a tool I use, so it grows when I hit a wall. If you try it and something is awkward, the issue tracker is the place to say so.
More on PrintMD
-
A PDF service that only runs on your machine
PrintMD’s PDF service turns Markdown into a PDF with one request, and it refuses to be hosted. Why that’s on purpose, and how it stays locked down…
-
Custom sizes, one long page and fit to width
Not every PDF is an A4 page. PrintMD’s page options cover a custom size, one continuous page, scaling wide tables to fit and your own margin, and…
-
Print-quality PDFs from a browser
A browser can print any page to PDF, but a document you send someone needs more. How PrintMD gets fonts, page breaks and images right, and what its…
Featured projects
-
Mullet
A job runner that plans a coding job, runs it unattended in a sandboxed clone, and marks each step done only when its own checks pass.
-
Solar Calendar
A calendar of 13 identical 28-day months, with each year starting on the first Monday on or after the spring equinox.
-
Where Should I Live
Rank cities around the world by what you’d keep after tax, what a month costs, which visas you can get and how each place fits the way you live.
More writing
-
Where Mullet goes next
Mullet 2.5.0 is out. What I plan next: a guard that checks a step fits a model’s window, a price ceiling instead of a free switch, more settings and…
-
Eight rules from a game framework’s agent prompts, for web and print design
On 1 November I read the agent prompts of VibeGame, a framework that builds 2D web games, and kept the eight techniques that carry over to web and…
-
What I tried and binned, and what each one cost
Three local-model options I stopped using, with what each cost and the verdict: a 25 GB model that timed out in a job, a Blackwell-only fork ruled…
-
When your plan has no five-hour limit
Mullet 2.5.0 copes with a Claude plan whose usage data has no five-hour window: the HUD drops the five-hour figures and the budget guard paces on…