pdf

Installation
SKILL.md

PDF documents

Use pypdf for existing files, ReportLab for new reports and PDFium for page rendering. Bundled helpers declare dependencies; run them with uv run --no-project, resolving paths relative to this skill. For a task-specific generator use uv run --no-project --with 'pypdf[crypto]>=6.19' --with reportlab script.py.

Workflow

  1. Confirm output, page order and requested operations. Inspect page count, metadata and encryption. Keep the original; helpers refuse overwriting it or an existing output.
  2. Read PDF operations for creation, merge/split/rotation, watermarks, encryption and image extraction. For filling or overlaying a form, read forms first: distinguish real AcroForm fields, scanned/static forms and XFA.
  3. Use a new file for every modification. Signed/certified PDFs are refused by the modification helper; get an authorized unsigned working copy. Passwords are read from local UTF-8 files, never exposed in command arguments. Remove temporary secret files under the user's retention policy; never publish them.
  4. Reopen the result to compare pages, field values and requested operations. Render all affected pages and inspect text, crop, checkbox state, placement and glyphs before delivery. Rendering includes form appearances and annotations.
uv run --no-project <skill>/scripts/pdf.py fields input.pdf
uv run --no-project <skill>/scripts/pdf.py fill input.pdf filled.pdf --values values.json
uv run --no-project <skill>/scripts/pdf.py flatten filled.pdf flattened.pdf
uv run --no-project <skill>/scripts/pdf.py watermark input.pdf marked.pdf --overlay one-page-watermark.pdf
uv run --no-project <skill>/scripts/pdf.py render filled.pdf pdf-preview
uv run --no-project <skill>/scripts/pdf.py --help
Installs
6
Repository
legout/skills
First Seen
Oct 3, 2026