PDF Processing
When to use this skill
Use this skill when the user needs to work with PDF files, including:
- Extracting text or tables from PDF documents
- Filling out PDF forms programmatically
- Merging multiple PDF files into one
- Splitting PDF files into separate documents
How to extract text
- Use pdfplumber for text extraction:
import pdfplumber with pdfplumber.open('document.pdf') as pdf: text = pdf.pages[0].extract_text()
How to fill forms
- Use PyPDF2 to fill form fields:
from PyPDF2 import PdfReader, PdfWriter reader = PdfReader('form.pdf') writer = PdfWriter() # Fill fields here
How to merge documents
See the reference guide for details.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.