This skill converts image-heavy PDFs into images and analyzes their content using Claude's vision capability, converting it into Markdown.
Quick Start
Basic Usage
# 1. PDF を画像に変換
wsl python3 scripts/pdf_to_images.py "/mnt/c/path/to/file.pdf"
# 2. 各画像を Read ツールで読み込んで解析
# 3. Markdown 形式でまとめる
Prerequisites
Required packages:
# Python パッケージ
wsl pip3 install pdf2image Pillow
# システムパッケージ (poppler)
wsl sudo apt-get update
wsl sudo apt-get install -y poppler-utils
Workflow
Step 1: Convert PDF to images
wsl python3 scripts/pdf_to_images.py "/mnt/c/path/to/document.pdf"
This allows document_pages/ A directory is created, and each page is saved as an image:
page_001.pngpage_002.pngpage_003.png- ...
Step 2: Analyze each image
Read each image in order using the Read tool and analyze its content.
Example instruction during analysis:
この画像の内容を詳しく説明してください:
- タイトルや見出し
- 本文テキスト
- 図表の説明
- グラフやチャートのデータ
- 重要なポイント
Step 3: Integrate into Markdown
Integrate the analysis results for each page to create a single Markdown file.
Usage Examples
Example 1: Convert presentation materials to Markdown
User: "presentation.pdf を vision で解析して Markdown 化して"
Assistant:
1. scripts/pdf_to_images.py で PDF を画像に変換
2. 各画像を Read ツールで読み込み
3. 各ページの内容を解析(タイトル、図表、テキスト)
4. 全ページの解析結果を統合
5. Write ツールで Markdown ファイルに保存
Example 2: Analyze only specific pages
User: "document.pdf の 5-10 ページだけ解析して"
Assistant:
1. PDF を画像に変換(全ページ)
2. page_005.png から page_010.png のみ Read で読み込み
3. 該当ページの内容を Markdown 化
Analysis Perspectives
Information to be automatically extracted
Extract the following from the image of each page:
-
Text Information
- Title・Headings
- Body text
- Bulleted lists
- Notes・Captions
-
Figures and Tables
- Type of diagram (flowchart, organizational chart, etc.)
- Description・Summary of the diagram
- Main elements and relationships
-
Graphs & Charts
- Type of graph (bar graph, pie chart, etc.)
- Axis labels
- Main data points
- Trends and tendencies
-
Tables
- Table structure
- Header row
- Data content
- Convert to Markdown table format
-
Layout・Structure
- Overall page layout
- Section division
- Emphasized information
Markdown Output Format
# [PDFタイトル]
**解析日時:** YYYY-MM-DD
**総ページ数:** N
---
## Page 1: [ページタイトル]
### 概要
[ページの概要説明]
### 主要な内容
- [ポイント1]
- [ポイント2]
### 図表
**図1: [図のタイトル]**
[図の説明]
### テキスト内容
[ページ内のテキスト]
---
## Page 2: [ページタイトル]
...
Script Details
pdf_to_images.py
Features:
- Convert each page of the PDF to a PNG image
- Resolution can be specified (default: 200 DPI)
- Automatic creation of the output directory
Usage:
python scripts/pdf_to_images.py <pdf_path> [output_dir] [dpi]
# 例
python scripts/pdf_to_images.py document.pdf ./images 300
Output:
[pdf_name]_pages/page_001.png[pdf_name]_pages/page_002.png- ...
Supported Content
- ✅ Text (Japanese・English)
- ✅ Figures and tables・Diagrams
- ✅ Graphs & Charts
- ✅ Tables
- ✅ Screenshots
- ✅ Infographics
- ✅ Complex layouts
- ⚠️ Handwritten notes (accuracy depends on the situation)
- ⚠️ Low-resolution images (accuracy may decrease)
Differences from Text Extraction
pdf-reader (text extraction)
- ✅ Fast for text-only PDFs
- ✅ Pure text extraction
- ❌ Figures and tables cannot be extracted
- ❌ Layout is simplified
pdf-vision-reader (image analysis)
- ✅ Understands figures and tables・graphs
- ✅ Preserves complex layouts
- ✅ Descriptions of visual elements
- ⚠️ Processing time is long
- ⚠️ API cost (image analysis)
Recommended Usage
| PDF type | Recommended Skills |
|---|---|
| Text-centric documents | pdf-reader |
| Presentation materials | pdf-vision-reader |
| Materials with many figures and graphs | pdf-vision-reader |
| Technical drawings and design documents | pdf-vision-reader |
| Papers (including figures and tables) | pdf-vision-reader |
| Simple text PDFs | pdf-reader |
Troubleshooting
pdf2image not found
wsl pip3 install pdf2image
poppler-utils not found
wsl sudo apt-get update
wsl sudo apt-get install -y poppler-utils
Image conversion fails
- Check whether the PDF is corrupted
- Check disk space
- Possible insufficient memory (split large PDFs for processing)
Low analysis accuracy
- Increase DPI (300 recommended)
python scripts/pdf_to_images.py document.pdf ./images 300 - Check the image 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 the necessary pages
- After converting all pages, analyze only the important pages
-
DPI adjustment
- Many figures and tables: 300 DPI
- Text-centric: 150-200 DPI
-
Batch processing
- Do not process multiple PDFs in parallel (process sequentially)
Path conversion
Converting from Windows paths to WSL paths:
C:\Users\...→/mnt/c/Users/...D:\Projects\...→/mnt/d/Projects/...
Related tools
- pdf-reader: For text-centric PDFs
- docx-reader: For Word documents
- OCR Tools: pytesseract (text-specialized)
Version history
- v1.0.0 (2026-01-06): Initial release
- PDF → image conversion feature
- Vision-based analysis workflow
- Support for understanding figures and graphs
- Markdown output format