pdf
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
By appautomaton · 684 installs
npx skills add appautomaton/document-skills --skill pdf
Source repository · Upstream listing
PDF Processing Guide
Overview
This guide covers essential PDF processing operations using Python libraries and command line tools. For advanced features, JavaScript libraries, and detailed examples, see reference.md. If you need to fill out a PDF form, read forms.md and follow its instructions.
Prerequisites
Python dependencies are resolved automatically by uv run — every script declares them in its PEP 723 header. Some workflows also need system tools:
poppler ( brew install poppler / apt get install poppler utils ) — provides pdftoppm and pdftotext ; required by the form filling workflow, which converts PDF pages to images via pdf2image
tesseract ( brew install tesseract tesseract lang ) — only for OCR on scanned documents (see [ocr.md](ocr.md))
qpdf ( brew install qpdf ) — only for the command line recipes in the qpdf section below
Quick Start
Python Libraries
pypdf Basic Operations
Merge PDFs
Split PDF
Extract Metadata
Rotate Pages
pdfplumber Text and Table Extraction
Extract Text with Layout
Extract Tables
Advanced Table Extraction
reportlab Create PDFs
Basic PDF Creation
Create PDF with Multiple Pages
Command Line Tools
pdftotext (poppler utils)
qpdf
pdftk (if available)
Common Tasks
Extract Text from Scanned PDFs
Add Watermark
Extract Images
Password Protection
Quick Reference
Task Best Tool Command/Code
Merge PDFs pypdf writer.add page(page)
Split PDFs pypdf One page per file
Extract text pdfplumber page.extract text()
Extract tables pdfplumber page.extract tables()
Create PDFs reportlab Canvas or Platypus
Command line merge qpdf qpdf empty pages ...
OCR scanned PDFs pytesseract Convert to image first
Fill PDF forms pypdf See forms.md
Next Steps
Complex table extraction : For multi page tables, borderless tables, and detection tuning, see [tables.md](tables.md)
Scanned PDF processing : For OCR with image preprocessing, see [ocr.md](ocr.md)
Form filling : For fillable and non fillable PDF forms, see [forms.md](forms.md)
Advanced features : For pypdfium2, JavaScript libraries (pdf lib), and troubleshooting, see [reference.md](reference.md)