office-pdf
Installation
SKILL.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
uvis 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: