astro-han/pawwork/office-pdf
Claude Code and agent skill by astro-han/pawwork
- community
Checking that the SKILL.md file is still in the repository.
PDF parsing (uv + pdfplumber / pypdf): use this for reading or extracting text/tables from any PDF. PDF generation (author print-ready HTML, then print with PawWork's bundled Chromium) is best-effort — where the runtime exposes no print entry point, report that generation is unavailable rather than substituting another tool. Hard rule: never use PyMuPDF / fitz (AGPL).
Install
npx vskill@latest install astro-han/pawwork/office-pdfSKILL.md
office-pdf — generate and parse PDF
Two independent paths: generate a PDF from HTML using PawWork's bundled Chromium, and parse an existing PDF with permissively-licensed Python libraries.
License hard rule (non-negotiable)
Never use PyMuPDF / `fitz` / `pymupdf` — it is AGPL and must not enter the product. Also avoid any tool that shells out to it. Allowed parsers are pdfplumber (MIT) and pypdf (BSD) only. For rendering, use the bundled Chromium — not wkhtmltopdf, not LibreOffice, not a system-installed browser.
Runtime contract
uvmust be onPATHfor the parse path. Parsing runs throughuv run; the runtime injects the package-mirror environment variables souvresolvespdfplumber/pypdffrom the internal mirror. You do not configure the mirror.- If `uv` is missing (parse path), stop and report exactly:
office-pdf parsing requires 'uv' on PATH, but 'uv --version' failed. This is an environment problem — uv should be provisioned by the PawWork runtime. Do not fall back to system pip; report the missing uv instead. - The skill directory ships read-only inside the app bundle. Never write into it. Work in a fresh directory.
Path 1 — Generate (HTML → Chromium printToPDF)
PawWork bundles its own Chromium; the PDF is produced by that engine's Page.printToPDF (Chrome DevTools Protocol) driving your HTML. No external browser install, no wkhtmltopdf, no LibreOffice.
Author a self-contained HTML file built for print:
- Set page geometry with
@page { size: A4; margin: 18mm; }(orLetter, or an explicitsize: 210mm 297mm). - Inline all CSS and, where practical, images (as
data:URIs) so the page renders without network fetches. - Use
page-break-before/after/break-inside: avoidto control pagination; design against print CSS, not screen scroll. - Prefer real text and CSS/SVG vector graphics over rasterized screenshots so the PDF stays selectable and crisp.
Then render it to PDF through the runtime's bundled-Chromium print entry point (Page.printToPDF over the browser bridge). If the current build exposes no PDF/print tool, report that the generation path is not available in this runtime rather than shelling out to an unbundled browser or an AGPL library — this can happen while the bundled-Chromium print entry point is still being wired up, so degrade gracefully instead of substituting another tool.
Path 2 — Parse (uv + pdfplumber / pypdf)
SKILL_DIR is the skill's base directory as a plain filesystem path — copy the line labeled "Base directory as a plain filesystem path" from the skill-load output. Do not use the file:// URL form; if only a file:// URL is available, strip the file:// prefix first.
The shipped pyproject.toml pins both parsers so either import resolves offline, but you only need one per task — choose by need, both run from work/:
- `pdfplumber` — layout-aware text and table extraction; use when you need columns, tables, or word positions.
``bash uv run python -c "import pdfplumber,sys; \ [print(p.extract_text() or '') for p in pdfplumber.open(sys.argv[1]).pages]" input.pdf ``
- `pypdf` — fast plain-text, metadata, page count, and split/merge; use for quick text or manipulation.
``bash uv run python -c "from pypdf import PdfReader; import sys; r=PdfReader(sys.argv[1]); \ print(len(r.pages), 'pages'); print(r.pages[0].extract_text())" input.pdf ``
If text extraction returns empty, the PDF is likely scanned images — say so and stop; do not reach for PyMuPDF or any AGPL OCR-render path.
Security
- Security scanPassed, 91 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/office-pdf/SKILL.md
Popularity
- Repository stars
- 89
- Repository forks
- 11
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/astro-han/pawwork/office-pdf)