PDF to Markdown Conversion¶
Convert PDF documents to structured Markdown using natural language with the pdf-to-markdown skill from the Core plugin.
Quick Start¶
Simply tell Claude Code what you want:
| Text Only | |
|---|---|
Claude Code will:
- Ask which mode you prefer (fast or vision)
- Execute the conversion
- Save the Markdown file
- Report the results
Invocation Examples¶
Overview¶
The skill offers two conversion modes optimized for different document types:
| Mode | Method | Speed | Best For |
|---|---|---|---|
fast | PyMuPDF text extraction | Very fast | Simple text documents |
vision | Claude Code image analysis | Medium | Complex layouts, code, tables |
No Manual Steps Required
Unlike direct script usage, invoking the skill handles the entire workflow automatically — including image analysis in vision mode.
Prerequisites¶
| Bash | |
|---|---|
Use Cases¶
Simple Text Document¶
Convert a report or whitepaper without complex formatting.
| Text Only | |
|---|---|
Technical Book with Code¶
Convert a programming textbook with code examples, tables, and multi-column layout.
No Extra API Costs
Vision mode runs on your existing Claude Code session — no separate API key required.
Scientific Paper¶
Convert a two-column academic paper with formulas and references.
| Text Only | |
|---|---|
Scanned Document (OCR)¶
Convert a scanned historical document or handwritten notes.
| Text Only | |
|---|---|
Chapter-by-Chapter Conversion¶
Extract specific chapters from a large book.
| Text Only | |
|---|---|
Text Only (No Images)¶
Extract only text content, skip embedded images.
| Text Only | |
|---|---|
Direct Script Usage (Advanced)¶
For automation or batch processing, you can also use the script directly:
| Bash | |
|---|---|
API Costs for Direct Mode
Using --use-api incurs charges on your Anthropic account.
Decision Guide¶
| Document Type | Recommended Mode | Options |
|---|---|---|
| Plain text | fast | Default |
| With images | fast | Default |
| Code examples | vision | Claude Code |
| Tables | vision | Claude Code |
| Multi-column | vision | Claude Code |
| Scans / OCR | vision | --dpi 300 |
| Batch / CI | vision --use-api | API key |
CLI Reference¶
Troubleshooting¶
Installation Issues¶
PyMuPDF not found
| Bash | |
|---|---|
Poppler not installed
Conversion Quality¶
Umlauts display incorrectly
The fast mode automatically fixes LaTeX-style umlauts (¨a → ä). If issues persist, use vision mode for better character recognition.
Text is scrambled or incomplete
This typically indicates a complex layout. Switch to vision mode:
| Bash | |
|---|---|
Password-protected PDF
Remove password protection first:
| Bash | |
|---|---|
Performance¶
Memory error on large PDFs
Process in smaller chunks:
Rate limiting with Direct API
The script automatically waits 60 seconds on rate limit errors. For frequent limits, reduce pages per run or upgrade your API tier.
Tips¶
-
Always test with one page first
Bash -
Choose the right DPI
- 150 DPI: Standard, good balance (default)
- 200 DPI: Better quality for vision analysis
- 300 DPI: Optimal for scanned documents
-
Split large PDFs
- Process >100 pages in chunks
- Saves memory and allows checkpointing
-
Quality control
- Always spot-check the output
- Complex layouts may need manual cleanup