arborlogic/openzerocode/pdf-official
- community
Checking that the SKILL.md file is still in the repository.
Use this skill whenever a PDF file is being produced, opened, transformed, filled, or read. That includes: extracting text or tables from an existing PDF; combining, carving, rotating, cropping, or watermarking pages; composing a fresh PDF (report, invoice, certificate); filling AcroForm fields or overlaying text onto a non-fillable scanned form; encrypting or unlocking a PDF; running OCR over a scanned document; rendering pages to PNG/JPEG for visual analysis. Trigger on mentions of 'PDF', a filename ending in .pdf, requests like 'turn this into a PDF report', or references to AcroForm / form fields.
Install
npx vskill@latest install arborlogic/openzerocode/pdf-officialSKILL.md
The same SKILL.md was published earlier as cilipep/ai-agent-with-tslab/pdf-official.
PDF skill
An Apache-2.0 toolkit for reading, composing, transforming, and filling PDF files. Written from scratch on top of permissively-licensed open-source libraries (pypdf, pdfplumber, pypdfium2, reportlab, pdf-lib, qpdf) so this can be embedded in commercial projects without special agreement.
Route the task
Pick the sub-guide by the verb of the request.
| Task | Path | Read | |
|---|---|---|---|
| Pull text / tables / metadata / images out of an existing PDF | Extract | `extract.md` | |
| Combine, carve, rotate, crop, watermark, encrypt, or shrink | Transform | `transform.md` | |
| Build a PDF that doesn't exist yet (report, invoice, certificate) | Compose | `compose.md` | |
| Fill a form (AcroForm or scanned) | Interactive | `interactive.md` | |
| Scanned / image-only PDF (no selectable text) | Extract → OCR | `extract.md` §5 |
If a task mixes several of these, follow the order: probe → plan → extract or compose → validate.
Every path starts with a probe. scripts/survey.py returns page count, whether the file is encrypted, whether it has an AcroForm, and whether page 1 looks like a scan.
First install
Python-only path (all BSD / MIT / Apache) — covers 95% of tasks:
Add these external binaries only when you actually need them:
Every script under scripts/ uses argparse. Exit codes: 0 OK · 1 runtime failure · 2 bad arguments · 3 validation failure (apply_values.py / overlay_text.py; sanity_check.py reports findings with exit 1). Any single script can be lifted into another project — none imports from a shared framework.
One-command triage
Sample output:
Route by the flags:
is_locked: true→ unlock first (qpdf --password=… --decrypt). Almost
every reader library refuses locked files.
form_field_count > 0→ widgets path in `interactive.md` §1.form_field_count == 0AND you need to fill it → overlay path
in `interactive.md` §2.
looks_scanned: true→ skip pypdf text extraction, go straight to OCR
(`extract.md` §5).
Which library for which task
| Task | Preferred | Reason | Fallback | |
|---|---|---|---|---|
| Plain text | pdftotext -layout | fastest, keeps columns | pypdf | |
| Positioned text | pdfplumber | char-level bboxes | pypdfium2.get_text | |
| Tables | pdfplumber | tunable table_settings | pandas over manual CSV | |
| Page → image | pypdfium2 | Apache/BSD, no GPL | pdftoppm (GPL) | |
| Merge / carve / rotate | pypdf | pure Python | qpdf --pages (faster on huge files) | |
| Encrypt / repair / linearise | qpdf | handles broken input | pypdf (basic encrypt only) | |
| Compose from scratch | reportlab | mature, BSD | pdf-lib in Node | |
| Fill AcroForm | pypdf.update_page_form_field_values | preserves widget appearances | pdf-lib in Node | |
| Overlay on non-fillable | reportlab + pypdf.merge_page | two-layer merge, see interactive.md | — |
Common gotchas
- PDF origin is bottom-left, image origin is top-left. Every "off by a
few points" bug is one of these two systems misapplied. Coordinate conversion is in one place: `interactive.md` §2.c.
- `pypdf.extract_text()` returns nothing for scans. That's not a bug —
there's no text stream. Use the looks_scanned flag and route to OCR.
- **Unicode subscripts / superscripts render as black rectangles in
reportlab** because Helvetica/Times/Courier don't ship those glyphs. Use <sub> / <super> XML in Paragraph, or move the pen manually on canvas. See `compose.md` §5.
- XFA forms are not AcroForms. If
probe_fields.pyreturns[]on a
PDF that clearly has widgets in Adobe Reader, it's XFA — flatten it in Acrobat first.
- `writer.encrypt(pw)` in pypdf uses RC4 by default. For real AES-256,
pass algorithm="AES-256", or use qpdf --encrypt … 256 --.
What's next
Open the sub-guide from the routing table and work through it end to end. Each sub-guide has a Validation section at the bottom describing how to confirm the result.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/pdf-official/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/arborlogic/openzerocode/pdf-official)