Overview
The PDF skill provides comprehensive PDF processing capabilities including reading and extracting text/tables, combining or splitting PDFs, rotating pages, adding watermarks, creating new PDFs from scratch, filling forms, encrypting/decrypting, extracting images, and performing OCR on scanned documents.Use this skill for any task involving PDF files - reading, creating, modifying, or converting. For advanced features and detailed examples, consult the skill’s REFERENCE.md file. For PDF form filling, see FORMS.md.
Quick Start
Python Libraries
pypdf - Basic Operations
Merge PDFs
Merge PDFs
Split PDF
Split PDF
Extract Metadata
Extract Metadata
Rotate Pages
Rotate Pages
pdfplumber - Text and Table Extraction
Extract Text with Layout
Extract Text with Layout
Extract Tables
Extract Tables
Advanced Table Extraction to Excel
Advanced Table Extraction to Excel
reportlab - Create PDFs
Basic PDF Creation
Basic PDF Creation
Create Multi-Page PDF
Create Multi-Page PDF
Subscripts and Superscripts
Subscripts and Superscripts
Instead, use ReportLab’s XML markup tags in Paragraph objects:For canvas-drawn text (not Paragraph objects), manually adjust font size and position.
Command-Line Tools
pdftotext (poppler-utils)
qpdf
QPDF Commands
QPDF Commands
pdftk (if available)
Common Tasks
Extract Text from Scanned PDFs (OCR)
OCR with Tesseract
OCR with Tesseract
Requires:
pip install pytesseract pdf2imageAdd Watermark
Extract Images
Password Protection
Encrypt PDF
Encrypt PDF
Quick Reference Table
Best Practices
Library Selection Guide:
- pypdf: Basic operations (merge, split, rotate, encrypt)
- pdfplumber: Text and table extraction with layout preservation
- reportlab: Creating new PDFs from scratch
- pytesseract: OCR for scanned documents
Next Steps
- For advanced pypdfium2 usage, see REFERENCE.md
- For JavaScript libraries (pdf-lib), see REFERENCE.md
- For PDF form filling instructions, follow FORMS.md
- For troubleshooting guides, see REFERENCE.md