
Pdf Processing
- 26 installs
- 4 repo stars
- Updated April 11, 2026
- 89jobrien/steve
pdf-processing is a Claude Code skill for extracting text and tables from PDFs and merging, splitting, and filling PDF documents in Python.
About
pdf-processing is a Claude Code skill for working with PDF files in Python. It shows how to extract text and tables with pdfplumber, merge and split documents with pypdf, fill forms, run OCR on scanned pages, and handle common errors. A developer uses it when they need to programmatically read, transform, or assemble PDF files.
- Text and table extraction with pdfplumber, including tables-to-CSV
- Merge and split PDFs with pypdf; form filling via FORMS.md
- Notes OCR path (pytesseract) for scanned PDFs and error handling for empty pages
Pdf Processing by the numbers
- 26 all-time installs (skills.sh)
- Ranked #423 of 688 Office & Documents skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
pdf processing capabilities & compatibility
- Capabilities
- pdf extraction · pdf merge split · pdf form filling · pdf ocr
- Use cases
- pdf parsing · documentation
- Pricing
- Free
What pdf processing says it does
Extract text and tables from PDF files, fill forms, merge documents.
Use pdfplumber to extract text from PDFs:
pytesseract** - OCR for scanned PDFs (requires tesseract)
npx skills add https://github.com/89jobrien/steve --skill pdf-processingAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 26 |
|---|---|
| repo stars | ★ 4 |
| Last updated | April 11, 2026 |
| Repository | 89jobrien/steve ↗ |
What it does
Extract text and tables from PDFs and merge, split, or fill PDF documents programmatically in Python.
Who is it for?
Developers who need to programmatically extract, transform, or assemble PDF files.
Skip if: Non-PDF document formats or users wanting a no-code GUI PDF editor.
When should I use this skill?
Working with PDF files, extracting text or tables, filling forms, or merging and splitting documents.
What you get
Extracted PDF text/tables or assembled PDF documents produced with the appropriate Python library.
- extracted PDF text
- extracted tables (CSV)
- merged or split PDF
By the numbers
- 4 documented PDF packages (pdfplumber, pypdf, pdf2image, pytesseract)
- 5 performance tips
Files
PDF Processing
Quick start
Use pdfplumber to extract text from PDFs:
import pdfplumber
with pdfplumber.open("document.pdf") as pdf:
text = pdf.pages[0].extract_text()
print(text)Extracting tables
Extract tables from PDFs with automatic detection:
import pdfplumber
with pdfplumber.open("report.pdf") as pdf:
page = pdf.pages[0]
tables = page.extract_tables()
for table in tables:
for row in table:
print(row)Extracting all pages
Process multi-page documents efficiently:
import pdfplumber
with pdfplumber.open("document.pdf") as pdf:
full_text = ""
for page in pdf.pages:
full_text += page.extract_text() + "\n\n"
print(full_text)Form filling
For PDF form filling, see FORMS.md for the complete guide including field analysis and validation.
Merging PDFs
Combine multiple PDF files:
from pypdf import PdfMerger
merger = PdfMerger()
for pdf in ["file1.pdf", "file2.pdf", "file3.pdf"]:
merger.append(pdf)
merger.write("merged.pdf")
merger.close()Splitting PDFs
Extract specific pages or ranges:
from pypdf import PdfReader, PdfWriter
reader = PdfReader("input.pdf")
writer = PdfWriter()
# Extract pages 2-5
for page_num in range(1, 5):
writer.add_page(reader.pages[page_num])
with open("output.pdf", "wb") as output:
writer.write(output)Available packages
- pdfplumber - Text and table extraction (recommended)
- pypdf - PDF manipulation, merging, splitting
- pdf2image - Convert PDFs to images (requires poppler)
- pytesseract - OCR for scanned PDFs (requires tesseract)
Common patterns
Extract and save text:
import pdfplumber
with pdfplumber.open("input.pdf") as pdf:
text = "\n\n".join(page.extract_text() for page in pdf.pages)
with open("output.txt", "w") as f:
f.write(text)Extract tables to CSV:
import pdfplumber
import csv
with pdfplumber.open("tables.pdf") as pdf:
tables = pdf.pages[0].extract_tables()
with open("output.csv", "w", newline="") as f:
writer = csv.writer(f)
for table in tables:
writer.writerows(table)Error handling
Handle common PDF issues:
import pdfplumber
try:
with pdfplumber.open("document.pdf") as pdf:
if len(pdf.pages) == 0:
print("PDF has no pages")
else:
text = pdf.pages[0].extract_text()
if text is None or text.strip() == "":
print("Page contains no extractable text (might be scanned)")
else:
print(text)
except Exception as e:
print(f"Error processing PDF: {e}")Performance tips
- Process pages in batches for large PDFs
- Use multiprocessing for multiple files
- Extract only needed pages rather than entire document
- Close PDF objects after use
PDF Form Filling Guide
Overview
This guide covers filling PDF forms programmatically using PyPDF2 and pdfrw libraries.
Analyzing form fields
First, identify all fillable fields in a PDF:
from pypdf import PdfReader
reader = PdfReader("form.pdf")
fields = reader.get_fields()
for field_name, field_info in fields.items():
print(f"Field: {field_name}")
print(f" Type: {field_info.get('/FT')}")
print(f" Value: {field_info.get('/V')}")
print()Filling form fields
Fill fields with values:
from pypdf import PdfReader, PdfWriter
reader = PdfReader("form.pdf")
writer = PdfWriter()
writer.append_pages_from_reader(reader)
# Fill form fields
writer.update_page_form_field_values(
writer.pages[0],
{
"name": "John Doe",
"email": "john@example.com",
"address": "123 Main St"
}
)
with open("filled_form.pdf", "wb") as output:
writer.write(output)Flattening forms
Remove form fields after filling (make non-editable):
from pypdf import PdfReader, PdfWriter
reader = PdfReader("filled_form.pdf")
writer = PdfWriter()
for page in reader.pages:
writer.add_page(page)
# Flatten all form fields
writer.flatten_form_fields()
with open("flattened.pdf", "wb") as output:
writer.write(output)Validation
Validate field values before filling:
def validate_email(email):
return "@" in email and "." in email
def validate_form_data(data, required_fields):
errors = []
for field in required_fields:
if field not in data or not data[field]:
errors.append(f"Missing required field: {field}")
if "email" in data and not validate_email(data["email"]):
errors.append("Invalid email format")
return errors
# Usage
data = {"name": "John Doe", "email": "john@example.com"}
required = ["name", "email", "address"]
errors = validate_form_data(data, required)
if errors:
print("Validation errors:")
for error in errors:
print(f" - {error}")
else:
# Proceed with filling
passCommon field types
Text fields:
writer.update_page_form_field_values(
writer.pages[0],
{"text_field": "Some text"}
)Checkboxes:
# Check a checkbox
writer.update_page_form_field_values(
writer.pages[0],
{"checkbox_field": "/Yes"}
)
# Uncheck a checkbox
writer.update_page_form_field_values(
writer.pages[0],
{"checkbox_field": "/Off"}
)Radio buttons:
writer.update_page_form_field_values(
writer.pages[0],
{"radio_group": "/Option1"}
)Best practices
1. Always validate input data before filling 2. Check field names match exactly (case-sensitive) 3. Test with small files first 4. Keep originals - work on copies 5. Flatten after filling for distribution
Related skills
FAQ
What libraries does pdf-processing use?
pdfplumber for text and table extraction, pypdf for manipulation, pdf2image for image conversion, and pytesseract for OCR of scanned PDFs.
Can it handle scanned PDFs?
Yes, it detects pages with no extractable text and points to pytesseract OCR (which requires tesseract).
Can it fill PDF forms?
Yes, form filling is covered in the bundled FORMS.md guide using PyPDF2 and pdfrw.