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

  • uv must be on PATH for the parse path. Parsing runs through uv run; the runtime injects the package-mirror environment variables so uv resolves pdfplumber / pypdf from 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:

Installs
1
GitHub Stars
104
First Seen
Aug 25, 2026
office-pdf — astro-han/pawwork