Markdown to polished PDF: 3 Claude skill paths (with proper Chinese fonts)
Three Claude Code skills for turning Markdown into print-ready PDF, compared on layout quality, Chinese (CJK) font handling, and post-processing flexibility. With install commands and pipeline examples.
Generating a .pdf from Markdown sounds trivial until you discover three
problems: CJK fonts render as squares, page breaks land mid-paragraph,
and embedded code blocks lose their highlighting. Most pandoc one-liners
fail on at least one of these. The Claude skill ecosystem has three paths
that each solve a subset.
This post compares them and shows when to pick which.
Path 1: pdf-creator (WeasyPrint, CJK-aware)
pdf-creator by @daymade
is the most “front-end” of the three — it uses WeasyPrint, which converts
HTML/CSS to PDF. The CSS engine handles Chinese fonts, layout, and pagination
better than pandoc’s LaTeX path.
npx degit daymade/claude-code-skills/pdf-creator ~/.claude/skills/pdf-creator
Use it when:
- Source is Markdown with mixed Chinese / English / code.
- You want proper Chinese font rendering without manually configuring font fallback chains.
- You need modern CSS print features (page-break-after, named pages, running headers).
Example pipeline:
Use pdf-creator to render this research note (Chinese body + English code blocks) into a print-ready A4 PDF. Use a serif body font and ensure CJK glyphs render correctly. Save to
./output/notes.pdf.
Path 2: anthropic-pdf (manipulation, not generation)
anthropic-pdf is the inverse of path 1 — it’s
for working with PDFs that already exist, not generating new ones from
Markdown.
npx degit anthropics/skills/skills/pdf ~/.claude/skills/pdf
Use it when:
- You already have a PDF and need to merge / split / watermark / OCR / encrypt.
- You’re building a pipeline that consumes PDFs (extract tables, extract text, fill form fields).
- You need to round-trip a PDF (read → modify → write).
It’s not a Markdown → PDF tool. But chained after pdf-creator, it’s the post-processor: generate with pdf-creator, watermark/merge with anthropic-pdf.
Example pipeline:
Step 1: Use pdf-creator to convert these three Markdown chapters to PDFs. Step 2: Use anthropic-pdf to merge them, add a “DRAFT” watermark to every page, and add page numbers in the footer.
Path 3: anthropic-docx + Word’s PDF export
anthropic-docx generates a .docx first, which
you can then export to PDF either programmatically (LibreOffice headless,
Microsoft Word automation) or by hand.
npx degit anthropics/skills/skills/docx ~/.claude/skills/docx
Use it when:
- The deliverable is a Word document first (legal letter, consulting report) and PDF is just a distribution format.
- You need track changes / comments in the source document, not just the PDF.
- The recipient might want to edit the source and they live in Microsoft Word.
- You need a letterhead (Word handles this more cleanly than HTML/CSS).
Example pipeline:
Use anthropic-docx to draft a 6-page consulting report from these notes. Cover page, ToC, three sections with subheadings, embedded chart, custom letterhead. Then I’ll export to PDF in Word.
Side-by-side comparison
| Need | Path |
|---|---|
| Chinese / CJK content rendering correctly | pdf-creator |
| Print-quality long-form document | pdf-creator |
| Modify an existing PDF | anthropic-pdf |
| Letterhead, comments, track changes | anthropic-docx |
| Output is consumed in Word | anthropic-docx |
| Need to fill PDF forms | anthropic-pdf |
| OCR a scanned PDF | anthropic-pdf |
| Just want HTML → PDF, English content | pdf-creator (still wins on layout) |
Common pitfalls
Pandoc + LaTeX is not on this list for a reason. It works for English
academic papers but breaks badly on Chinese — XeLaTeX font config is
notoriously fragile. If your team has a working pandoc + xeCJK pipeline,
keep it. If you’re starting fresh, pdf-creator skips this entire mess.
LibreOffice headless conversion (soffice --convert-to pdf) is
unreliable for complex layouts but works fine for simple .docx →
PDF. Pair it with anthropic-docx for the doc-first workflow.
@page CSS selectors are pdf-creator’s secret weapon. Most Markdown →
PDF pipelines treat the document as continuous flow. WeasyPrint respects
named pages, running headers/footers, page-break-before, etc. — which is
why the output looks like a real document instead of a long screenshot.
Composing all three
For a research report distributed bilingually:
anthropic-docx— draft in Word for editorial review.- Export
.docx→ PDF with LibreOffice headless. anthropic-pdf— add watermark, page numbers, encrypt.
For a personal notes archive (Chinese-heavy):
- Write Markdown.
pdf-creator— convert to print-ready PDF with CJK fonts.anthropic-pdf— merge multiple notes into a quarterly archive.
For a public-facing report (English):
- Markdown drafts.
pdf-creator— render with brand-styled CSS.anthropic-pdf— encrypt, add metadata.
Browse all PDF-related skills →