Create, read, merge, fill, and secure PDF files. Use when generating PDFs, extracting text/tables, building or filling AcroForm forms, merging/splitting/watermarking/stamping pages, encrypting or decrypting documents, or preparing official IRS tax forms.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- metadata
- { "tags": [ "pdf", "documents", "forms", "reportlab", "pypdf", "pdfplumber", "acroform", "tax-forms" ], "backends": [ "hermes", "grok-build" ], "category": "office", "related_skills": [ "docx", "xlsx", "pptx" ] }
- description
- Create, read, merge, fill, and secure PDF files. Use when generating PDFs, extracting text/tables, building or filling AcroForm forms, merging/splitting/watermarking/stamping pages, encrypting or decrypting documents, or preparing official IRS tax forms.
- when-to-use
- Use when generating reports/invoices as PDF, building or filling AcroForm forms (with layout linting and visual overlays), extracting text, tables, metadata, or form-field values, merging/splitting/rotating/watermarking/stamping pages, exporting pages as PNGs for visual review or OCR hand-off, managing metadata/attachments, or encrypting/decrypting with passwords. NOT for scanned/image-only PDFs (see references/ocr-extraction.md) and NOT for pixel-perfect HTML-to-PDF rendering (use a headless browser).
- argument-hint
- <create | make-form | lint-form | read | merge | split | fill | secure | watermark | stamp | page-image | meta> <in [out]>
02 资源文件 52
- 资产文件forms/f1040--2025.pdf224.6 KB
- 资产文件forms/f1040s1--2025.pdf102.6 KB
- 资产文件forms/f1040s2--2025.pdf98.1 KB
- 资产文件forms/f1040s3--2025.pdf70.4 KB
- 资产文件forms/f1040s8--2025.pdf102.2 KB
- 资产文件forms/f1040sa--2025.pdf79.6 KB
- 资产文件forms/f1040sb--2025.pdf78.0 KB
- 资产文件forms/f1040sc--2025.pdf125.8 KB
- 资产文件forms/f1040sd--2025.pdf99.8 KB
- 资产文件forms/f1040se--2025.pdf153.5 KB
- 资产文件forms/f1040sse--2025.pdf82.4 KB
- 资产文件forms/f2441--2025.pdf123.8 KB
- 资产文件forms/f5329--2025.pdf115.3 KB
- 资产文件forms/f8812--2025.pdf101.4 KB
- 资产文件forms/f8889--2025.pdf61.9 KB
- 资产文件forms/f8936--2025.pdf75.9 KB
- 资产文件forms/f8949--2025.pdf134.8 KB
- 资产文件forms/f8959--2025.pdf71.9 KB
- 资产文件forms/f8960--2025.pdf77.7 KB
- 资产文件forms/f8995--2025.pdf72.6 KB
- 许可证LICENSE1.0 KB
- 参考文档references/forms.md3.9 KB
- 参考文档references/nano-pdf-editing.md1.3 KB
- 参考文档references/ocr-extraction.md5.5 KB
- 参考文档references/rendering-and-advanced.md10.8 KB
- 参考文档references/tax-forms.md8.8 KB
- 参考文档references/tax.md969 B
- 参考文档references/usage.md12.6 KB
- 脚本scripts/_raster.py2.6 KB
- 脚本scripts/acroform/check_bounding_boxes.py2.9 KB
- 脚本scripts/acroform/check_fillable_fields.py278 B
- 脚本scripts/acroform/convert_pdf_to_images.py1002 B
- 脚本scripts/acroform/create_validation_image.py1.2 KB
- 脚本scripts/acroform/extract_form_field_info.py4.3 KB
- 脚本scripts/acroform/extract_form_structure.py4.0 KB
- 脚本scripts/acroform/fill_fillable_fields.py3.8 KB
- 脚本scripts/acroform/fill_pdf_form_with_annotations.py3.1 KB
- 脚本scripts/extract_marker.py3.4 KB
- 脚本scripts/extract_pymupdf.py3.6 KB
- 脚本scripts/pdf_create.py4.5 KB
- 脚本scripts/pdf_fill_form.py3.8 KB
- 脚本scripts/pdf_form_layout.py7.0 KB
- 脚本scripts/pdf_make_form.py5.8 KB
- 脚本scripts/pdf_merge.py1.6 KB
- 脚本scripts/pdf_meta.py4.4 KB
- 脚本scripts/pdf_page_image.py3.5 KB
- 脚本scripts/pdf_read.py5.7 KB
- 脚本scripts/pdf_secure.py2.6 KB
- 脚本scripts/pdf_split.py3.0 KB
- 脚本scripts/pdf_stamp.py5.6 KB
- 脚本scripts/pdf_watermark.py1.8 KB
- 脚本tests/test_pdf_skill.py17.0 KB
03 SKILL.md 正文
PDF Skill
Create PDFs from structured specs, build and fill AcroForm forms (with layout linting and visual overlays), extract text/tables/metadata, merge/split/rotate/watermark/stamp pages, export page images, manage metadata and attachments, and encrypt/decrypt — using pypdf, reportlab, and pdfplumber. Scanned (image-only) PDFs contain no text layer: when a page is image-only, stop and follow references/ocr-extraction.md instead of pretending to extract text.
Global rules
- Scanned / image-only PDFs stop the pipeline — export the pages with
pdf_page_image.pyat 300 dpi and followreferences/ocr-extraction.mdon the PNGs; do not report empty text as "no content", and do not fabricate text. - Inspect before touching — run
pdf_read.py --metafirst; ifencryptedis true, decrypt withpdf_secure.py --decryptbefore any other operation. Rotation must be a multiple of 90. - Verify after every operation — re-read with
pdf_read.py(--meta,--fields, or a re-extract) and confirm the result before reporting success; for anything visual (watermarks, flattened forms, stamps), render and inspect withvision_analyze.
Routing
| Step | Reference | Purpose |
|---|---|---|
| Commands, procedure, pitfalls, verification | references/usage.md |
When to Use, bundled toolchains, prerequisites, quick-reference command table, end-to-end procedure, full pitfall list, and the post-operation verification checklist. |
| Building or filling AcroForms | references/forms.md |
Field-spec geometry, radio groups, NeedAppearances behavior, layout-lint rules, and the visual review loop. |
| A page is image-only | references/ocr-extraction.md |
pymupdf-vs-marker decision table, scripts/extract_pymupdf.py, and scripts/extract_marker.py --check for disk headroom. |
| Text-in-existing-PDF by description | references/nano-pdf-editing.md |
nano-pdf edit f.pdf 3 "…" — not for structural work. |
| IRS tax forms (2025) | references/tax-forms.md, references/tax.md |
Required reading before filling any form in forms/; tax.md covers the preparation workflow. |
| Advanced rendering & tooling | references/rendering-and-advanced.md |
pypdfium2 rendering, pdf-lib / pdfjs-dist JavaScript, qpdf / poppler flags, performance tuning, and troubleshooting. |
04 同仓库更多 Skills
github-workflow
Umbrella for GitHub auth, repo management, issues, PRs, Mergify, and releases. Subsumes github-auth and repo-manager.
brave-automation
baa CLI: Brave profiles, Google sessions, credentials.
aes
AES docs, layers, rule fixes, and legacy migration.
pretext
Build creative browser demos with DOM-free text layout.
popular-web-designs
54 real design systems (Stripe, Linear, Vercel) as HTML/CSS.
p5js
p5.js sketches: gen art, shaders, interactive, 3D.