npm imprint-pdf 24 themes 8 templates 14 automated checks 0–100 print score MCP-ready

Markdown in.
Publisher-grade PDF out.

Imprint treats Markdown as the draft and the PDF as the finished product. It typesets like a publishing house — serif body, first-line indents, kinsoku punctuation rules, exact TOC page numbers, repeating table headers — then scores every PDF 0–100 with evidence for each check.

中文印刷级排版 · 24 套主题 · 8 套模板 · 自带 0–100 质检报告 · 一个命令出片

# One command. No config. Cross-platform. $ npx imprint-pdf paper.md ✓ 文本可选 15.0/15.0 · 字体嵌入 10.0/10.0 · 标点避头尾 10.0/10.0 · 目录页码 10.0/10.0 … ✓ 总分 100.0/100 · 等级 A+ · 9 页
24
design-system themes
8
built-in templates
14
automated quality checks
0–100
print-quality score, with evidence
How it works

From draft to finished document

Imprint is built for the AI-native workflow: you keep writing in Markdown, it handles everything that makes a document feel printed, and it proves the result with a machine-readable quality report.

01

Write Markdown

Frontmatter sets title / author / theme / layout. Cover and clickable TOC are generated automatically.

02

Imprint typesets it

Publisher rules: 2-em first-line indents, kinsoku line-breaking, widow/orphan control, cross-page tables with repeated headers, vector math & Mermaid charts.

03

It scores itself 0–100

14 checks — fonts, metadata, punctuation, TOC accuracy, contrast, glyphs, overflow, image DPI, PDF/UA tags — each with evidence, printed to your terminal.

Design system themes

24 themes. Every one passes print quality checks.

Each theme is a set of DTCG design tokens — palette, type pairing, spacing, decoration. Every theme passes automated WCAG print-contrast checks (body ≥ 7:1, small text ≥ 4.5:1). All thumbnails below are real rendered pages.

modern theme
modern现代杂志
academic theme
academic学术书卷
nord theme
nord北欧极简
sepia theme
sepia护眼纸色
newspaper theme
newspaper报纸头版
catppuccin theme
catppuccin柔和粉彩
mono theme
mono纯黑白
jade theme
jade玉石绿
coffee theme
coffee咖啡暖棕
ocean theme
ocean海洋蓝
lavender theme
lavender薰衣草紫
rose theme
rose樱粉
pine theme
pine松林绿
wine theme
wine勃艮第酒红
graphite theme
graphite石墨灰
midnight theme
midnight深夜蓝纸
coral theme
coral珊瑚橙
amber theme
amber琥珀金
mint theme
mint薄荷青
sand theme
sand沙漠沙色
minimal theme
minimal极简
ink theme
ink线装书
gongwen theme
gongwen红头公文
ieee theme
ieee英文论文
Templates

Eight templates. One command to scaffold.

Each template ships with its own typographic personality — imprint --new report gives you a graphite-gray business report; --new gongwen a GB/T 9704 red-header official document; --new ieee an English two-column IEEE-style paper.

📘

report

Graphite-gray business report

--new report
📖

book

Rice-paper book manuscript

--new book
📄

resume

Monospace CV, one page

--new resume
🛠️

techdoc

Ocean-blue technical doc

--new techdoc
✉️

letter

Lavender formal letter

--new letter
🎓

paper

Two-column academic paper

--new paper
🏛️

gongwen

Red-header official document

--new gongwen
🌐

ieee

IEEE-style English paper

--new ieee
The quality gate

A PDF is finished when it scores itself.

Every render runs 14 automated checks and prints a 0–100 report. No silent PDFs. You always know exactly what passed, what didn't, and why.

Text is selectableNever a scanned image pretending to be a document.
Fonts are subset-embeddedRenders correctly on any machine.
Metadata completeTitle, author and dates set in the file.
Kinsoku punctuation rulesNo punctuation at the start of a line.
No widows / orphansHeadings and lines never dangle.
TOC page numbers exactClickable entries match real pages.
Page numbers correctEvery page, in order.
PDF/UA accessibility tagsScreen-reader friendly by default.
File size saneNo accidental 200 MB exports.
Theme fonts really usedThe design system is honored in the output.
WCAG contrastBody ≥ 7:1, small text ≥ 4.5:1, decorative ≥ 3:1.
No missing glyphsLastResort / tofu blocks are detected and surfaced.
No content overflowNothing spills past the page.
Image DPI sufficientPrints crisp, never pixelated.
See it in the wild

Real PDFs, produced by Imprint.

These files were generated by Imprint itself and scored by its own validator. Download and open them — the quality report is reproducible on your machine.

Why Imprint

Compared to the usual suspects

Pandoc + LaTeXWord / DocsTypstBrowser printImprint
Print-grade CJK typographymanualmanualpartialweakby default
Chinese kinsoku & indentspkg-setupmanualpartialweakautomatic
Design-system themingnonopartialno24 themes
Automated 0–100 quality reportnononono14 checks
Vector math & Mermaidmath onlynomath onlynoboth
One-command from Markdownpipelinenonoyesnpx one-liner
PDF/UA accessibilitymanualmanualnonodefault
AI-agent ready (MCP server)nonononobuilt-in
Built for AI agents

From one sentence to a finished PDF.

MCP server, built in

Imprint ships an MCP server (imprint-mcp) with four tools: render_markdown, list_themes, validate_pdf, new_document. Point Claude, Codex, Cursor or any MCP client at it and agents can produce print-grade PDFs directly.

pip install "imprint-pdf[mcp] @ git+https://github.com/263311487-ux/imprint-pdf.git"
imprint-mcp            # stdio MCP server

One command, anywhere

The npm wrapper auto-installs the engine on first run (PyPI, with a GitHub fallback), so npx imprint-pdf works on any machine with Node — no Python setup needed.

  • npxnpx imprint-pdf paper.md
  • pippip install "imprint-pdf @ git+…"
  • MCPpip install "imprint-pdf[mcp]"
  • Smart skin — theme auto-recommended from content
  • Honest fonts — warns when a font is missing, never silently substitutes
Quick start

Up and running in 30 seconds.

Generate

npx imprint-pdf paper.md --out paper.pdf

Scaffold a template

npx imprint-pdf --new report

Pick a theme

npx imprint-pdf paper.md --theme academic

Full quality report

npx imprint-pdf paper.md --validate --verbose
FAQ

Questions, answered honestly.

What makes Imprint different from a Markdown-to-PDF converter?

Most converters dump Markdown into a page. Imprint typesets it: cover and clickable TOC with exact page numbers, 2-em first-line indents, kinsoku line-breaking, widow/orphan control, tables that repeat their header across pages, code that never splits mid-line — then scores the output 0–100 with evidence for each check.

Why 97/100 for the red-header document, not 100?

Because honesty is a feature. The gongwen template requires FangSong (仿宋) which ships with Windows but not macOS. On a machine without it, Imprint falls back to a serif font and deducts 3 points in the report — it tells you instead of pretending.

Do I need LaTeX, or a Python environment?

Neither. npx imprint-pdf auto-installs the engine on first run (pip with a GitHub fallback). The engine is a normal pip package for everyone else: pip install imprint-pdf.

Can AI agents use it?

Yes — it ships an MCP server (imprint-mcp) with render/list/validate/new tools, so agents can produce finished PDFs from a single sentence.

Is it free / open source?

MIT licensed, free forever, no accounts, no cloud. Everything runs locally.