| name | pdf |
| description | Extract and analyze text from PDF files, read PDF content, process PDF documents. Use when user wants to read, analyze, or extract information from PDF files. |
PDF Processing Skill
This skill helps you work with PDF files by extracting and analyzing their content, with built-in support for handling large files.
Capabilities
- Extract text content from PDF files
- Handle large PDFs with automatic pagination and character limits
- Read specific page ranges
- Show PDF structure summary without full content
- Analyze PDF structure and metadata
When to Use
Use this skill when:
- User asks to read a PDF file
- User wants to extract text from a PDF
- User needs to analyze PDF content
- User mentions working with .pdf files
How It Works
This skill uses Python with the PyPDF2 library to:
- Open and read PDF files
- Extract text with automatic limits to prevent overload
- Support pagination for large documents
- Provide structured output of the PDF content
Default Limits
- Maximum pages per request: 20 pages
- Maximum characters: 50,000 characters
These limits prevent "PDF too large" errors while still providing useful content.
Usage Examples
python pdf_reader.py document.pdf
python pdf_reader.py document.pdf --summary
python pdf_reader.py document.pdf --start 5 --end 10
python pdf_reader.py document.pdf --max-chars 100000
Handling Large PDFs
For large PDFs, use this workflow:
- First run with
--summary to see the PDF structure
- Then read specific sections using
--start and --end
Setup
Make sure you have Python and PyPDF2 installed:
pip install PyPDF2