pdf-reader
Read and extract content from PDF files — text, tables, metadata, and images.
Skill by espennilsen
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/espennilsen-pdf-reader
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/pdf-reader
What's inside
- Skill name
pdf-reader- Description
- Read and extract content from PDF files — text, tables, metadata, and images. Use when asked to read a PDF, extract text from a PDF, summarize a PDF, analyze a PDF document, get tables from a PDF, or check PDF metadata. Also triggers on "open this PDF", "what does this PDF say", "parse PDF", "PDF to text", or when a .pdf file path or URL is provided.
- License
- MIT
- Instructions
- 214 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
- Instructions call the network
Files (2)
- SKILL.md
- extract.py · scripts/
SKILL.md (first lines)
# PDF Reader
Extract content from PDF files using `pdftotext` (Poppler) for text and
`pdfplumber` (Python) for tables and structured extraction.
## Quick Reference
| Task | Tool | Command |
|------|------|---------|
| Full text | pdftotext | `pdftotext file.pdf -` |
| Text with layout | pdftotext | `pdftotext -layout file.pdf -` |
| Specific pages | pdftotext | `pdftotext -f 3 -l 5 file.pdf -` |
| Tables | pdfplumber | `python3 scripts/extract.py tables file.pdf` |
| Metadata | pdfinfo | `pdfinfo file.pdf` |
| Page count | pdfinfo | `pdfinfo file.pdf \| grep Pages` |
| Images | pdfimages | `pdfimages -list file.pdf` |
| Fonts | pdffonts | `pdffonts file.pdf` |
| OCR (scanned PDF) | tesseract | `python3 scripts/extract.py ocr file.pdf` |
| Smart text + OCR | extract.py | `python3 scripts/extract.py text file.pdf` |
| Quick survey | extract.py | `python3 scripts/extract.py scan file.pdf` |
## Workflow
### Step 1: Get the PDF
If the user provides a URL, download it first:
```bash
curl -sL "URL" -o /tmp/document.pdf
```
Verify it's a valid PDF:
```bash
file /tmp/document.pdf # should say "PDF document"
pdfinfo /tmp/document.pdf # metadata + page count
```
### Step 2: Choose Extraction Method
**Plain text (most cases):**
```bash
pdftotext file.pdf -
```
This pipes output to stdout. For large PDFs, use page ranges:
```bash
pdftotext -f 1 -l 10 file.pdf - # pages 1-10
```
**Layout-preserving text (columns, formatted docs):**
```bash
pdftotext -layout file.pdf -
```
Use `-layout` when the PDF has multi-column layouts, tables rendered as text,
or precise spacing that matters.
**Tables (structured data):**
```bash
python3 scripts/extract.py tables file.pdf
```
Or inline with pdfplumber:
```python
import pdfplumber
pdf = pdfplumber.open("file.pdf")
for i, page in enumerate(pdf.pages):
tables = page.extract_tables()
for table in tables:
print(f"\n--- Table on page {i+1} ---")
for row in table:
print(" | ".join(str(cell or "") for cell in row))
pdf.close()
```
**Metadata only:**
```bash
pdfinfo file.pdf
```
Returns: title, author, creator, producer, page count, page size, dates.
### Step 3: Handle Large PDFs
For PDFs over ~50 pages, don't dump everything at once:
1. Get page count: `pdfinfo file.pdf | grep Pages`
2. Extract in chunks: `pdftotext -f 1 -l 20 file.pdf -`
3. Process chunk, then continue: `pdftotext -f 21 -l 40 file.pdf -`
For targeted extraction (searching for specific content):
```bash
# Extract all text, grep for relevant sections
pdftotext file.pdf - | grep -n -i "keyword"
# Then extract the specific page range
pdftotext -f PAGE -l PAGE file.pdf -
```
### Step 4: Handle Scanned PDFs (OCR)
If `pdftotext` returns empty or garbled output, the PDF is likely scanned.
**Detection:**
```bash
python3 scripts/extract.py scan file.pdf # reports scanned pages
pdffonts file.pdf # empty = image-based
```
**Smart extraction (auto-fallback):**From espennilsen/pi, MIT.
More from espennilsen/pi
- 0.739score
herdr-setup
espennilsen
Use when installing, updating, configuring, or troubleshooting Herdr, including missing commands, PATH errors, version differences, or Pi integration setup.
SkillBFreshness: B★ 122Claude Code +9 - 0.739score
herdr-operations
espennilsen
Use when inspecting or operating Herdr sessions, workspaces, tabs, panes, agents, terminal output, agent messaging, or waits.
SkillBFreshness: B★ 122Claude Code +9 - 0.729score
cmux
espennilsen
Orchestrate cmux terminal panes — split terminals, run parallel processes, read output from other panes, and use the built-in browser.
SkillBFreshness: B★ 122Claude Code +9 - 0.726score
pi-subagent
espennilsen
Delegate tasks to specialized subagents for parallel or sequential execution.
SkillBFreshness: B★ 122Claude Code +9 - 0.681score
github
espennilsen
Interact with GitHub repos, PRs, issues, CI, and notifications via the pi-github extension commands and gh CLI.
SkillCFreshness: C★ 122Claude Code +9 - 0.676score
docstring-generator
espennilsen
Generate and update language-idiomatic doc comments for TypeScript (TSDoc/JSDoc) and Rust (Rustdoc).
SkillCFreshness: C★ 122Claude Code +9 - 0.671score
comfyui-node-update
espennilsen
Write and improve documentation for ComfyUI nodes in per-node JSON files.
SkillCFreshness: C★ 122Claude Code +9 - 0.607score
dry-code-review
espennilsen
Perform a comprehensive DRY (Don't Repeat Yourself) code review on a codebase.
SkillDFreshness: D★ 122Claude Code +9 - 0.607score
codebase-docs
espennilsen
Generate and maintain AI-readable markdown documentation for a codebase in docs/.
SkillDFreshness: D★ 122Claude Code +9 - 0.607score
extract-design-system
espennilsen
Reverse-engineer a design system from a live website (public URL or localhost).
SkillDFreshness: D★ 122Claude Code +9 - 0.607score
google-workspace
espennilsen
Manage Google Workspace via the gws CLI — Drive, Gmail, Sheets, Docs, Slides, People, Chat, Meet, Forms, and cross-service workflows.
SkillDFreshness: D★ 122Claude Code +9 - 0.602score
skill-creator
espennilsen
Create, review, and improve skills for Pi agents.
SkillDFreshness: D★ 122Claude Code +9
Signals
- Stars
- 122
- Forks
- 13
- Open issues
- 1
- Last commit (this folder)
- Mar 9, 2026 (7 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/espennilsen/pi
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from espennilsen
- 0.739score
herdr-setup
espennilsen
Use when installing, updating, configuring, or troubleshooting Herdr, including missing commands, PATH errors, version differences, or Pi integration setup.
SkillBFreshness: B★ 122Claude Code +9 - 0.739score
herdr-operations
espennilsen
Use when inspecting or operating Herdr sessions, workspaces, tabs, panes, agents, terminal output, agent messaging, or waits.
SkillBFreshness: B★ 122Claude Code +9 - 0.729score
cmux
espennilsen
Orchestrate cmux terminal panes — split terminals, run parallel processes, read output from other panes, and use the built-in browser.
SkillBFreshness: B★ 122Claude Code +9 - 0.726score
pi-subagent
espennilsen
Delegate tasks to specialized subagents for parallel or sequential execution.
SkillBFreshness: B★ 122Claude Code +9 - 0.681score
github
espennilsen
Interact with GitHub repos, PRs, issues, CI, and notifications via the pi-github extension commands and gh CLI.
SkillCFreshness: C★ 122Claude Code +9 - 0.676score
docstring-generator
espennilsen
Generate and update language-idiomatic doc comments for TypeScript (TSDoc/JSDoc) and Rust (Rustdoc).
SkillCFreshness: C★ 122Claude Code +9
Cite this page
pdf-reader skill. Agent Mart. https://agentmart.dev/skills/espennilsen-pdf-reader (last updated 2026-10-24)