pdf-vision-reader
Original:🇨🇳 Chinese
Translated
1 scriptsChecked / no sensitive code detected
Converts PDF pages to images and uses vision analysis to extract content including diagrams, charts, and visual elements. Use for PDFs with rich visual content. Requires pdf2image and poppler-utils.
22installs
Added on
NPX Install
npx skill4agent add childbamboo/claude-code-marketplace-sample pdf-vision-readerTags
Translated version includes tags in frontmatterSKILL.md Content (Chinese)
View Translation Comparison →PDF Vision Reader
This is a skill that converts PDFs with many diagrams and charts into images, analyzes their content using Claude's vision feature, and converts it to Markdown.
Quick Start
Basic Usage
bash
# 1. PDF を画像に変換
wsl python3 scripts/pdf_to_images.py "/mnt/c/path/to/file.pdf"
# 2. 各画像を Read ツールで読み込んで解析
# 3. Markdown 形式でまとめるPrerequisites
Required Packages:
bash
# Python パッケージ
wsl pip3 install pdf2image Pillow
# システムパッケージ (poppler)
wsl sudo apt-get update
wsl sudo apt-get install -y poppler-utilsWorkflow
Step 1: Convert PDF to Images
bash
wsl python3 scripts/pdf_to_images.py "/mnt/c/path/to/document.pdf"This creates a directory where each page is saved as an image:
document_pages/page_001.pngpage_002.pngpage_003.png- ...
Step 2: Analyze Each Image
Use the Read tool to load each image sequentially and analyze its content.
Example Instructions for Analysis:
Please provide a detailed description of this image's content including:
- Titles and headings
- Body text
- Diagram and chart descriptions
- Graph and chart data
- Key pointsStep 3: Integrate into Markdown
Integrate the analysis results from each page to create a single Markdown file.
Usage Examples
Example 1: Convert Presentation Materials to Markdown
User: "Analyze presentation.pdf using vision and convert it to Markdown"
Assistant:
1. Convert the PDF to images using scripts/pdf_to_images.py
2. Load each image with the Read tool
3. Analyze each page's content (titles, diagrams, text)
4. Integrate analysis results from all pages
5. Save as a Markdown file using the Write toolExample 2: Analyze Specific Pages Only
User: "Analyze only pages 5-10 of document.pdf"
Assistant:
1. Convert the PDF to images (all pages)
2. Load only page_005.png to page_010.png using Read
3. Convert the relevant pages' content to MarkdownAnalysis Perspectives
Automatically Extracted Information
The following information is extracted from each page image:
-
Text Information
- Titles and headings
- Body text
- Bullet point lists
- Annotations and captions
-
Diagrams and Charts
- Diagram type (flowchart, organizational chart, etc.)
- Diagram description and summary
- Key elements and relationships
-
Graphs and Charts
- Graph type (bar graph, pie chart, etc.)
- Axis labels
- Key data points
- Trends and patterns
-
Tables
- Table structure
- Header rows
- Data content
- Conversion to Markdown table format
-
Layout and Structure
- Overall page layout
- Section divisions
- Highlighted information
Markdown Output Format
markdown
# [PDF Title]
**Analysis Date:** YYYY-MM-DD
**Total Pages:** N
---
## Page 1: [Page Title]
### Overview
[Page overview description]
### Key Content
- [Point 1]
- [Point 2]
### Diagrams and Charts
**Figure 1: [Diagram Title]**
[Diagram description]
### Text Content
[Page text content]
---
## Page 2: [Page Title]
...Script Details
pdf_to_images.py
Features:
- Convert each PDF page to a PNG image
- Configurable resolution (default: 200 DPI)
- Automatic output directory creation
Usage:
bash
python scripts/pdf_to_images.py <pdf_path> [output_dir] [dpi]
# Example
python scripts/pdf_to_images.py document.pdf ./images 300Output:
[pdf_name]_pages/page_001.png[pdf_name]_pages/page_002.png- ...
Supported Content
- ✅ Text (Japanese, English)
- ✅ Diagrams and charts
- ✅ Graphs and charts
- ✅ Tables
- ✅ Screenshots
- ✅ Infographics
- ✅ Complex layouts
- ⚠️ Handwritten notes (accuracy depends on conditions)
- ⚠️ Low-resolution images (possible accuracy reduction)
Differences from Text Extraction
pdf-reader (Text Extraction)
- ✅ Fast for text-only PDFs
- ✅ Pure text extraction
- ❌ Cannot extract diagrams and charts
- ❌ Layout is simplified
pdf-vision-reader (Image Analysis)
- ✅ Understands diagrams and graphs
- ✅ Preserves complex layouts
- ✅ Describes visual elements
- ⚠️ Longer processing time
- ⚠️ API costs (image analysis)
Recommended Usage
| PDF Type | Recommended Skill |
|---|---|
| Text-focused documents | pdf-reader |
| Presentation materials | pdf-vision-reader |
| Materials with many diagrams/graphs | pdf-vision-reader |
| Technical drawings/blueprints | pdf-vision-reader |
| Research papers (with diagrams) | pdf-vision-reader |
| Simple text PDFs | pdf-reader |
Troubleshooting
pdf2image Not Found
bash
wsl pip3 install pdf2imagepoppler-utils Not Found
bash
wsl sudo apt-get update
wsl sudo apt-get install -y poppler-utilsImage Conversion Fails
- Check if the PDF is corrupted
- Check disk space
- Possible insufficient memory (split processing for large PDFs)
Low Analysis Accuracy
- Increase DPI (300 recommended)
bash
python scripts/pdf_to_images.py document.pdf ./images 300 - Check the quality of the original PDF
Performance
Estimated Processing Time
| Number of Pages | Image Conversion | Analysis (Claude Vision) | Total |
|---|---|---|---|
| 10 Pages | 5 seconds | 30-60 seconds | ~1 minute |
| 30 Pages | 15 seconds | 90-180 seconds | ~3 minutes |
| 100 Pages | 50 seconds | 300-600 seconds | ~10 minutes |
Optimization Tips
-
Process Only Necessary Pages
- After converting all pages, analyze only important pages
-
Adjust DPI
- Many diagrams: 300 DPI
- Text-focused: 150-200 DPI
-
Batch Processing
- Do not process multiple PDFs in parallel (process sequentially)
Path Conversion
Converting Windows Paths to WSL Paths:
- →
C:\Users\.../mnt/c/Users/... - →
D:\Projects\.../mnt/d/Projects/...
Related Tools
- pdf-reader: For text-focused PDFs
- docx-reader: For Word documents
- OCR Tool: pytesseract (text-specialized)
Version History
- v1.0.0 (2026-01-06): Initial Release
- PDF to image conversion feature
- Vision-based analysis workflow
- Support for understanding diagrams and graphs
- Markdown output format