uf-gzj/openspace-claude-evolution/pdf-text-extraction-9424c5
Claude Code and agent skill by uf-gzj/openspace-claude-evolution
- community
Checking that the SKILL.md file is still in the repository.
Extract text from PDF files using pdftotext when read_file returns binary data
Install
npx vskill@latest install uf-gzj/openspace-claude-evolution/pdf-text-extraction-9424c5SKILL.md
The same SKILL.md was published earlier as xyliu-cs/openspace-gdpval/pdf-text-extraction-9424c5.
PDF Text Extraction via pdftotext
Problem
When using read_file on PDF documents, the function may return binary image data or garbled content instead of readable text. This occurs because PDFs can contain scanned images or complex binary structures that read_file cannot properly parse as text.
Solution
Use the pdftotext command-line utility via run_shell to extract clean text content from PDF files.
Steps
1. Verify PDF file exists
2. Extract text using pdftotext
3. Handle parameter naming carefully
When calling read_file, be aware of the parameter name:
- Use
filetype="pdf"(notfile_type) - Some tool implementations may use different parameter names
Common pdftotext Options
| Option | Description | |
|---|---|---|
- | Output to stdout | |
-layout | Maintain original layout | |
-f <n> | Start from page n | |
-l <n> | End at page n | |
-q | Quiet mode |
Example with options:
Error Handling
When to Use This Pattern
read_filereturns binary data, garbled text, or image content for a PDF- You need searchable/processable text from PDF documents
- The PDF contains text (not just scanned images - for those, consider OCR tools)
Prerequisites
pdftotextmust be installed (part ofpoppler-utilson Debian/Ubuntu,poppleron macOS via Homebrew)- Verify availability:
run_shell(command="which pdftotext")
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinggdpval_bench/skills/pdf-text-extraction-9424c5/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/uf-gzj/openspace-claude-evolution/pdf-text-extraction-9424c5)