skills/handbook.adra.dev/pdf-acroform-fill

pdf-acroform-fill

SKILL.md

Goal

Produce a correctly filled PDF (new file) from a blank AcroForm template and structured user data, without relying on browser automation for the PDF viewer.

Do not use browser automation for in-browser PDFs

Chrome (and similar) render PDFs inside an internal viewer with no HTML form controls. Playwright/Cypress cannot reliably target AcroForm fields there.

Preferred path: download or use a local .pdf, then fill with pypdf via uv run.

Workflow

  1. Confirm the PDF is AcroForm

    • Run field listing (see below). If get_fields() is empty and the doc still looks interactive, it may be XFA-only — say so and propose Adobe/manual or a specialized XFA tool; do not pretend pypdf will work.
  2. Inventory fields

    • Use reader.get_fields() for writer-safe keys (e.g. dotted child names).
    • Walk page /Annots widgets for /TU (tooltip) → human label when /T is opaque.
    • Bundled helper from this skill (run from repo root or pass absolute path):
Installs
3
First Seen
Apr 17, 2026