Create PDF documents from markdown with proper Chinese font support using weasyprint. This skill should be used when converting markdown to PDF, generating formal documents (legal, trademark filings, reports), or when Chinese typography is required. Triggers include "convert to PDF", "generate PDF", "markdown to PDF", or any request for creating printable documents.
Install with Tessl CLI
npx tessl i github:fernandezbaptiste/claude-code-skills --skill pdf-creator92
Does it follow best practices?
If you maintain this skill, you can automatically optimize it using the tessl CLI to improve its score:
npx tessl skill review --optimize ./path/to/skillValidation for skill structure
Create professional PDF documents from markdown with proper Chinese font support.
Convert a single markdown file:
uv run --with weasyprint --with markdown scripts/md_to_pdf.py input.md output.pdfBatch convert multiple files:
uv run --with weasyprint --with markdown scripts/batch_convert.py *.md --output-dir ./pdfsIf encountering library errors, set these environment variables first:
export DYLD_LIBRARY_PATH="/opt/homebrew/lib:$DYLD_LIBRARY_PATH"
export PKG_CONFIG_PATH="/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH"The scripts use these Chinese fonts (with fallbacks):
| Font Type | Primary | Fallbacks |
|---|---|---|
| Body text | Songti SC | SimSun, STSong, Noto Serif CJK SC |
| Headings | Heiti SC | SimHei, STHeiti, Noto Sans CJK SC |
Problem: Chinese characters display as boxes Solution: Ensure Songti SC or other Chinese fonts are installed on the system
Problem: weasyprint import error
Solution: Run with uv run --with weasyprint --with markdown to ensure dependencies
4f0eae8
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.