Write a book in Markdown. Lay it out with CSS. Export a print-ready PDF.
print-md is a desktop application (with a CLI for power users) that turns a folder of markdown files into a professionally typeset PDF — the kind you'd send to an offset printer or a print-on-demand service. Under the hood it uses Paged.js and Chromium for layout, just like the W3C-recommended CSS Paged Media spec. You write content; print-md handles page breaks, running headers, columns, page numbers, and all the print-specific work that web browsers usually skip.
| Platform | Download (from the latest release) | What to do |
|---|---|---|
| Windows | print-md-viewer-<version>-win-x64.exe |
Download and run the installer. Use the .zip only if you need a portable copy. |
| macOS | print-md-viewer-<version>-arm64.dmg |
Open the disk image, drag the app to Applications |
| Linux | print-md-viewer-<version>.AppImage |
chmod +x the file, then double-click or run it |
The desktop app is fully self-contained — no Bun, Node, or other runtime to install. The only thing you may need is a Chromium-based browser (Chrome, Edge, Brave, etc) installed on the machine for the Save PDF feature; see the User Guide: Chapter 8 — System Setup for details.
-
Make a folder anywhere on your computer with a couple of markdown files in it:
my-book/ ├─ chapter-01.md └─ chapter-02.md -
Launch the desktop app, click Open Folder, pick your
my-book/folder. You'll see a paginated preview update live as you edit the files. -
Click Save PDF. Done.
For richer projects (cover art, fonts, a multi-chapter book with running headers, page numbers, etc), copy one of the example projects in examples/ as a starting point — with-design-guide is the most complete reference.
| If you want to… | Start here |
|---|---|
| Learn all print-md features | Print-md User Guide — 48-page comprehensive guide covering all core features |
| Understand markdown extensions (page breaks, columns, callouts) | User Guide: Chapter 2 — Writing Your Content |
| Style your book with CSS (fonts, colors, page size, margins) | User Guide: Chapter 4 — Styling & Theming |
| Structure your CSS like a pro — the recommended pattern for variant assignment | Contextual Cascade Principle |
| Create TTRPG/games content (stat blocks, dice notation, etc) | User Guide: Chapter 5 — TTRPG Extensions |
| Use the CLI for scripting, CI builds, or batch work | CLI README |
| Run the whole pipeline in Docker (all print tools pre-installed) | Docker guide |
| Add custom markdown plugins | User Guide: Chapter 6 — Plugins |
| Validate output for print production (TAC, ICC, PDF/X) | User Guide: Chapter 7 — Validation |
| Set up system tools (Chromium, Ghostscript, qpdf, etc) | User Guide: Chapter 8 — System Setup |
| Develop / contribute to print-md itself | CONTRIBUTING · Architecture |
See docs/ for technical architecture and developer references.
- Live preview with paginated layout — your book renders the way it'll print, while you edit
- PDF export — directly from the app, or via the
print-mdCLI - Print-ready output — PDF/X (CMYK + ICC profile) for offset printers and PDF/A
- Custom CSS for everything: typography, page size, margins, columns, running headers/footers, page numbers, bleed
- Plugin system for custom markdown — use any of hundreds of existing
markdown-it-*plugins, or write your own - Validation — pre/post-build checks for image DPI, color space, font embedding, structural PDF correctness
- CI-friendly — single-binary CLI runs in GitHub Actions, GitLab CI, Docker, anywhere
Browse the examples/ directory for real projects you can copy:
with-design-guide— the most complete reference. A multi-chapter design guide that exercises the layout features: custom fonts, page templates, columns, sidebars, and callouts.print-md-user-guide— the comprehensive user guide, authored in print-md itself.with-validation— focused on the pre-/post-build validation pipeline.
print-md/
├─ packages/
│ ├─ cli/ — @dimm-city/print-md — library + CLI + standalone binary (markdown, preview, build, lint)
│ └─ viewer/ — @dimm-city/print-md-viewer — Electron desktop app
├─ examples/ — Sample projects
└─ docs/ — Authoring, architecture, system requirements
The desktop app, CLI, and the library all use the same rendering pipeline under the hood. What you preview is what you build.
print-md is open source. Issues, ideas, and pull requests welcome at https://github.com/dimm-city/print-md/issues.