PythonClaw pdf_writer
Create PDF documents from text, Markdown, or HTML content. Use when: user asks to create, generate, or write a PDF. Supports headings, paragraphs, bullet lists, tables, and basic formatting. NOT for: editing existing PDFs, filling forms, or adding images/charts.
install
source · Clone the upstream repo
git clone https://github.com/ericwang915/PythonClaw
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ericwang915/PythonClaw "$T" && mkdir -p ~/.claude/skills && cp -r "$T/pythonclaw/templates/skills/data/pdf_writer" ~/.claude/skills/ericwang915-pythonclaw-pdf-writer && rm -rf "$T"
manifest:
pythonclaw/templates/skills/data/pdf_writer/SKILL.mdsource content
PDF Writer Skill
Create PDF documents from plain text, Markdown, or structured content using fpdf2.
When to Use
✅ USE this skill when:
- "Create a PDF with this text"
- "Write a report as PDF"
- "Convert this markdown to PDF"
- "Generate a PDF document"
- User wants to produce a new PDF file from scratch
When NOT to Use
❌ DON'T use this skill when:
- Editing an existing PDF → use PDF manipulation tools
- Filling PDF forms → use form-filling libraries
- Complex layouts with images/charts → use LaTeX or specialized tools
- Converting PDF to other formats → use
pdf_convert
Usage/Commands
python {skill_path}/write_pdf.py OUTPUT_PATH [options]
Options:
— plain text body--text "content"
— read body from a text/markdown file--file INPUT_FILE
— document title (shown on first page)--title "Title"
— PDF metadata author--author "Name"
— base font size (default 12)--font-size 12
— landscape orientation (default portrait)--landscape
— output result as JSON--format json
Content passed via
--text or --file supports lightweight Markdown:
,# Heading 1
,## Heading 2### Heading 3- bullet items
and**bold***italic*- Blank lines for paragraph breaks
Examples
- "Create a PDF with this text" →
python {skill_path}/write_pdf.py output.pdf --text "Hello World" - "Write report.md as PDF" →
python {skill_path}/write_pdf.py report.pdf --file report.md --title "Report" - "Generate a landscape PDF" →
python {skill_path}/write_pdf.py wide.pdf --text "..." --landscape
Notes
- Install dependency:
pip install fpdf2 - Output is UTF-8 compatible (supports CJK characters via built-in fonts)
- Maximum recommended body size: ~100 KB of text