Use when you have a written implementation plan to execute in a separate session with review checkpoints
npx skills add EnzoGiglioEB/ai-resources --skill "pdf-processing-pro"
Install specific skill from multi-skill repository
# Description
Advanced PDF manipulation (OCR, forms, tables). Use this skill any time a user wants to: read, extract, merge, split, rotate, watermark, encrypt, decrypt, fill forms, extract tables, or perform OCR on PDF files
# SKILL.md
name: pdf-processing-pro
description: "Advanced PDF manipulation (OCR, forms, tables). Use this skill any time a user wants to: read, extract, merge, split, rotate, watermark, encrypt, decrypt, fill forms, extract tables, or perform OCR on PDF files"
license: Apache 2.0
PDF Processing Pro
Overview
Comprehensive PDF processing capabilities including OCR, form filling, table extraction, and document manipulation.
Capabilities
Document Manipulation
- Merge PDFs: Combine multiple PDFs into one
- Split PDFs: Extract pages or split into multiple files
- Rotate pages: Change page orientation
- Add watermarks: Text or image watermarks
- Encrypt/Decrypt: Password protection
Content Extraction
- OCR: Extract text from scanned PDFs
- Tables: Extract tables to structured data
- Images: Extract embedded images
- Text: Extract searchable text content
Form Processing
- Fill forms: Populate PDF form fields programmatically
- Extract form data: Read form field values
- Analyze forms: Detect form fields and structure
Key Tools
PyPDF2
Basic PDF manipulation (merge, split, rotate)
from PyPDF2 import PdfReader, PdfWriter
# Merge PDFs
writer = PdfWriter()
for pdf in ['file1.pdf', 'file2.pdf']:
reader = PdfReader(pdf)
for page in reader.pages:
writer.add_page(page)
writer.write('merged.pdf')
Tesseract OCR
Extract text from scanned/image PDFs
# OCR a PDF
tesseract input.pdf output -l eng pdf
# Multi-language OCR
tesseract input.pdf output -l eng+por pdf
Tabula/Camelot
Extract tables from PDFs
import tabula
# Extract all tables
tables = tabula.read_pdf('document.pdf', pages='all')
# Extract specific area
tables = tabula.read_pdf('document.pdf', area=[0,0,100,100])
pdftk
Advanced PDF toolkit
# Fill PDF form
pdftk form.pdf fill_form data.fdf output filled.pdf
# Rotate pages
pdftk input.pdf cat 1-endeast output rotated.pdf
# Add password
pdftk input.pdf output secured.pdf user_pw PASSWORD
Workflows
OCR Workflow
- Check if PDF is searchable
- If not, convert to images
- Run OCR with Tesseract
- Create searchable PDF
Reference: See OCR.md for detailed OCR guide
Form Processing Workflow
- Analyze form structure
- Extract field names and types
- Prepare form data
- Fill form programmatically
Reference: See FORMS.md for form processing guide
Table Extraction Workflow
- Identify table pages
- Extract with Tabula or Camelot
- Clean and structure data
- Export to CSV/Excel
Reference: See TABLES.md for table extraction guide
Best Practices
- Test with sample pages before processing entire document
- Preserve original files - always work on copies
- OCR language selection - specify correct language(s)
- Table extraction - try both Tabula and Camelot for best results
- Form validation - verify field names before filling
Common Use Cases
Merge Multiple PDFs
# Simple merge
pdftk file1.pdf file2.pdf cat output merged.pdf
Extract Specific Pages
# Pages 1-5 and 10
pdftk input.pdf cat 1-5 10 output extracted.pdf
OCR Scanned Document
# OCR with Portuguese + English
tesseract scan.pdf output -l por+eng pdf
Extract Tables
import tabula
df_list = tabula.read_pdf('report.pdf', pages='all')
for i, df in enumerate(df_list):
df.to_csv(f'table_{i}.csv')
Bundled Resources
Documentation
OCR.md- Complete OCR processing guideFORMS.md- PDF form handling guideTABLES.md- Table extraction guide
Scripts
scripts/analyze_form.py- Analyze PDF form structure
Note: This skill supports both Python (PyPDF2, tabula, camelot) and command-line tools (tesseract, pdftk). Ensure required tools are installed for full functionality.
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.