pdf (MIT)

Read, create, fill and transform PDFs: text/tables, OCR, forms, merge/split, encrypt.

pdf (MIT) processes PDFs locally: text/tables, OCR, forms, merge/split/encrypt. Downloadable and script-editable.

Office documentsagents 2MIT downloadable Scan upstream repo ↗

What it is

Reads, creates, fills and transforms PDFs: text and table extraction, OCR of scans, filling fillable and flat forms, flattening, merging, splitting, rotating, stamping and encryption. For anyone whose task takes a .pdf or must produce one. It is not a layout design tool.

Core workflow

StageContent
TriggerA task takes a .pdf as input or must output one
InputThe PDF, target page ranges, a form field and value JSON, coordinate boxes
StepsClassify the task; forms always go through the scripts in forms.md; text via pdfplumber or pdftotext -layout, and pages with no text are scans, so switch to ocr.md; tables via pdfplumber; new PDFs via reportlab; merge, split, rotate, stamp and encrypt via pypdf; look at every touched page before delivery
OutputThe changed PDF, a field inventory JSON, validation PNGs and each script’s findings
BoundaryNeeds uv and poppler (pdftoppm), plus Tesseract for OCR; AES needs pypdf[crypto]; without a rendered check the job is not done

Getting started: Run check_fillable_fields.py first to learn whether the form is fillable or flat, then choose the matching scripts.

Traits

  • A complete form path: identify, extract fields, check ids, pages and values, fill, then flatten
  • Flat forms are checked for overlapping or too-short boxes and drawn onto a page for visual review
  • pdf_coords.py converts between page-image pixels and PDF points
  • Delivery requires looking at every page with convert_pdf_to_images.py --pages

Who it is for and who it is not for

Good fitPoor fit
Filling government or institutional formsKeeping editable form fields, which flattening removes
Text and table extraction from scansScanned OCR without Tesseract
Batch merging, splitting, stamping, encryptingComplex layout design and typesetting

How it differs

NeedUse
Read, fill or edit a PDF locallyappautomaton’s pdf (this page)
Produce a docx draftappautomaton’s docx
Generate a PDF report from a topicskywork-doc
Fold PDF tables into a workbookskywork-excel

Source-level risks

RiskSourceImpact
Two coordinate systemsPDF starts at the bottom-left of the page box in points; pdfplumber and page images start at the top-left, and the box need not start at (0,0)Stamps and filled values land in the wrong spot, hard to notice
Rotated pages/Rotate only changes display; content and form fields keep unrotated coordinatesA plain scale plus y-flip misses, so transfer_rotation_to_content() is required
Merging loses structureadd_page() drops bookmarks and links while append() keeps them; matching field names merge into one fieldNavigation and form behaviour change after the merge
Fonts and encryptionreportlab’s built-in fonts draw Chinese as black boxes; AES needs pypdf[crypto]New PDFs show black boxes, or opening raises DependencyError

Example: input and output

Input

Extract payment terms from this scanned contract.

Output

Outputs structured clauses plus OCR text.

扫描件需 OCR。

FAQ

Vs official pdf?

MIT and downloadable; the official is index-only.

Scanned files?

Yes, via the OCR path.

CategoryOffice documents
Version2026-11-28
Agent supportClaude Code, Generic (reads SKILL.md)
OSmacOS / Linux / Windows
DependenciesLibreOffice / poppler / pandoc(渲染与读取)、Node.js(npm install 依赖)、Python(pdf 脚本)、Python(uv 运行)
Environmentnone
Scriptsreviewed: local files only, no network calls
LicenseMIT
Sourceappautomaton/document-SKILLs ↗
Verification✓ verified
Get itDownload zip
SHA256: b23dbb39d228c4768c95cc231b1b8ccd2f802f99d3f57fdad085820de0705116 · 0.0 MB

"Generic (agents that read SKILL.md)" means any agent that discovers and loads SKILL.md; support level (auto-discovery, manual config, script execution) varies by agent.

Install
unzip appautomaton-document-skills-pdf-2026-11-28.zip -d ~/.claude/skills/

Skills directory example: ~/.claude/skills/ for Claude Code; other agents use wherever SKILL.md is discovered.