Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

pdf

БесплатноЗапускает вложенные скриптыНе проверен

PDF files: create, read, merge, fill, OCR, edit text.

jiayaoqijiaот jiayaoqijia★ 81 звезда на GitHub

Об этом скилле

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. Two absorbed capabilities live in references/ (read the matching file before those tasks):

  • Scanned/image-only PDFs and OCR (pymupdf fast path, marker-pdf quality path, scripts/extract_pymupdf.py + scripts/extract_marker.py): references/ocr-extraction.md
  • Editing text inside an existing PDF via natural-language prompts (nano-pdf CLI): references/nano-pdf-editing.md
  • Markdown/HTML → PDF with headless Chrome (reports, portfolio docs, anything with CSS layout or real screenshots): references/html-to-pdf-headless.md
  • Long-form designed reports built with reportlab (cover, running footer, callout boxes, dense tables, no browser on the host): references/reportlab-longform-report.md

When to Use

  • Generate a report, invoice, or multi-page document as PDF.
  • Build a fillable AcroForm (text/checkbox/radio/dropdown) from a JSON spec, linting the layout first.
  • Pull text, tables (JSON/CSV), metadata, or form-field values out of a PDF.
  • Merge, split, rotate, extract page subsets, watermark, stamp text/images at coordinates, bookmark, or compress PDFs.
  • Export pages as PNGs for visual review or for OCR hand-off; set/clear document metadata; add/extract file attachments.
  • Fill or flatten AcroForm forms; encrypt or decrypt with passwords.
  • NOT for scanned/image-only PDFs (use references/ocr-extraction.md) and NOT for CSS-layout HTML-to-PDF rendering — use references/html-to-pdf-headless.md instead of reportlab. When no headless browser is installed, a multi-page designed report goes through references/reportlab-longform-report.md, not through a hand-written JSON spec.

Prerequisites

  • Python 3.10+ with pypdf, reportlab, pdfplumber: python -m pip install pypdf reportlab pdfplumber
  • Optional, for page rasterization (pdf_page_image.py, overlay rendering): python -m pip install pypdfium2, or poppler's pdftoppm on PATH. Scripts fall back pypdfium2 → pdftoppm and report {"rendered": false, "missing": [...]} (exit 0) when neither exists.
  • Each helper script checks imports lazily and prints an install hint if a dependency is missing.

How to Run

All helpers live in scripts/ and are argparse CLIs — run them with the terminal tool; every one supports --help. They read/write JSON strictly as UTF-8, print JSON results to stdout, and exit non-zero on failure.

python scripts/pdf_create.py spec.json -o out.pdf         # build PDF from JSON spec
python scripts/pdf_make_form.py formspec.json -o form.pdf # build fillable AcroForm from JSON spec
python scripts/pdf_form_layout.py formspec.json           # lint form layout BEFORE building
python scripts/pdf_form_layout.py formspec.json --render-overlay boxes.png [--pdf form.pdf]
python scripts/pdf_read.py doc.pdf --text                 # per-page text (JSON)
python scripts/pdf_read.py doc.pdf --tables --csv-dir t/  # tables to JSON + CSV files
python scripts/pdf_read.py doc.pdf --meta                 # metadata, page sizes, encrypted/scanned flags
python scripts/pdf_read.py form.pdf --fields              # form fields: name, type, value
python scripts/pdf_merge.py a.pdf b.pdf -o merged.pdf [--bookmarks]
python scripts/pdf_split.py doc.pdf --pages 1-3,7 -o part.pdf [--rotate 90]
python scripts/pdf_fill_form.py form.pdf --fields-json values.json -o filled.pdf [--flatten]
python scripts/pdf_secure.py doc.pdf --encrypt -o enc.pdf --user-password your-password
python scripts/pdf_secure.py enc.pdf --decrypt -o dec.pdf --password your-password
python scripts/pdf_watermark.py doc.pdf --stamp mark.pdf -o stamped.pdf [--under]
python scripts/pdf_stamp.py doc.pdf -o out.pdf --text "DRAFT" --x 150 --y 400 \
    --font-size 60 --rotation 45 --opacity 0.3 --color "#cc0000" [--pages 1-3]
python scripts/pdf_stamp.py doc.pdf -o out.pdf --image sig.png --x 400 --y 60 --width 120
python scripts/pdf_page_image.py doc.pdf --pages 1-3 --dpi 150 --out-dir imgs/
python scripts/pdf_meta.py doc.pdf --set-meta --title "T" --author "A" -o out.pdf
python scripts/pdf_meta.py doc.pdf --attach data.csv -o out.pdf
python scripts/pdf_meta.py doc.pdf --list-attachments | --extract-attachments dir/

Quick Reference

Task Tool Command / API
Create doc (headings, tables, images) reportlab platypus pdf_create.py spec.json -o out.pdf
Build fillable form reportlab acroForm pdf_make_form.py formspec.json -o form.pdf
Lint form layout / overlay image pure python + PIL pdf_form_layout.py formspec.json [--render-overlay o.png]
Per-page text pdfplumber pdf_read.py f.pdf --text
Tables → JSON/CSV pdfplumber pdf_read.py f.pdf --tables
Metadata / sizes / encrypted / scanned
Полный SKILL.md на GitHub

Установить pdf в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

LICENSESOURCE.mdTRUST.auto.yamlreferences/forms.mdreferences/html-to-pdf-headless.mdreferences/nano-pdf-editing.mdreferences/ocr-extraction.mdreferences/reportlab-longform-report.mdscripts/_raster.pyscripts/extract_marker.pyscripts/extract_pymupdf.pyscripts/pdf_create.pyscripts/pdf_fill_form.pyscripts/pdf_form_layout.pyscripts/pdf_make_form.pyscripts/pdf_merge.pyscripts/pdf_meta.pyscripts/pdf_page_image.pyscripts/pdf_read.pyscripts/pdf_secure.pyscripts/pdf_split.pyscripts/pdf_stamp.pyscripts/pdf_watermark.py

FAQ

Что делает скилл pdf?

PDF files: create, read, merge, fill, OCR, edit text.

Как установить скилл pdf?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл pdf запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить pdf с