Back to list
duc01226

markdown-to-pdf

by duc01226

2🍴 1📅 Jan 24, 2026

SKILL.md


name: markdown-to-pdf description: Convert markdown files to PDF with custom styling. Use when generating PDF documents from markdown, creating printable documentation, or exporting reports.

markdown-to-pdf

Convert markdown files to professionally-styled PDF documents.

Installation Required

cd .claude/skills/markdown-to-pdf
npm install

Dependencies: md-to-pdf (includes Puppeteer, auto-downloads Chromium ~200MB)

Quick Start

# Basic conversion
node .claude/skills/markdown-to-pdf/scripts/convert.cjs \
  --file ./README.md

# Custom output path
node .claude/skills/markdown-to-pdf/scripts/convert.cjs \
  --file ./doc.md \
  --output ./output/doc.pdf

# Custom styling
node .claude/skills/markdown-to-pdf/scripts/convert.cjs \
  --file ./report.md \
  --style ./custom-style.css

CLI Options

OptionRequiredDescription
--file <path>YesInput markdown file
--output <path>NoOutput PDF path (default: input name + .pdf)
--style <path>NoCustom CSS file

Output Format (JSON)

{
  "success": true,
  "input": "/path/to/input.md",
  "output": "/path/to/output.pdf",
  "pages": 5
}

Default Styling

  • GitHub-flavored markdown
  • Code syntax highlighting (highlight.js)
  • Sans-serif body (system fonts)
  • Monospace code blocks
  • A4 page size, 2cm margins

Customization

Create custom CSS:

body {
  font-family: Georgia, serif;
  font-size: 12pt;
  line-height: 1.6;
}
h1 { color: #2c3e50; border-bottom: 2px solid #3498db; }
code { background: #f4f4f4; padding: 2px 6px; }

Troubleshooting

Chromium download fails: Set PUPPETEER_SKIP_DOWNLOAD=1 then manually install Chrome Memory issues: Large docs may need --max-old-space-size=4096

Task Planning Notes

  • Always plan and break many small todo tasks
  • Always add a final review todo task to review the works done at the end to find any fix or enhancement needed

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon