← スキル一覧に戻る

pdf-to-markdown
by duc01226
⭐ 2🍴 1📅 2026年1月24日
SKILL.md
name: pdf-to-markdown description: Convert PDF files to Markdown. Use when extracting text from PDFs, creating editable documentation from PDF reports, or converting PDF content to version-controlled markdown files.
pdf-to-markdown
Convert PDF files to Markdown format.
Installation Required
cd .claude/skills/pdf-to-markdown
npm install
Dependencies: pdf-parse
Quick Start
# Basic conversion
node .claude/skills/pdf-to-markdown/scripts/convert.cjs \
--file ./document.pdf
# Custom output path
node .claude/skills/pdf-to-markdown/scripts/convert.cjs \
--file ./doc.pdf \
--output ./output/doc.md
CLI Options
| Option | Required | Description |
|---|---|---|
--file <path> | Yes | Input PDF file |
--output <path> | No | Output Markdown path (default: input name + .md) |
Output Format (JSON)
{
"success": true,
"input": "/path/to/input.pdf",
"output": "/path/to/output.md",
"wordCount": 1523,
"warnings": ["Tables may not be accurately converted"]
}
Supported Elements
- Text extraction from digital PDFs
- Headings (detected by font size heuristics)
- Paragraphs
- Basic lists
- Links (when embedded in PDF)
Known Limitations
- Tables: Very limited support; may not render correctly
- Multi-column layouts: Text may interleave between columns
- Scanned PDFs: NOT supported (requires OCR - see alternatives below)
- Images: NOT extracted (PDF images are not included in output)
- Complex formatting: May be simplified or lost
- Password-protected PDFs: NOT supported
Alternatives for Unsupported Cases
For scanned PDFs (OCR needed):
- Use
scribe.js-ocrlibrary (AGPL license) - Commercial OCR services (Google Cloud Vision, AWS Textract)
For complex tables:
- Consider AI-based extraction (LLM post-processing)
- Manual review and correction
For image extraction:
- Use
unpdflibrary withsharpfor image extraction - Process images separately and reference in markdown
Troubleshooting
Dependencies not found: Run npm install in skill directory
Empty output: PDF may be scanned/image-based (requires OCR)
Garbled text: PDF may use embedded fonts not supported by parser
Memory issues: Large PDFs may require --max-old-space-size=4096 flag
Task Planning Notes
- Always plan and break many small todo tasks
- Always add a final review todo task to review the works done at the end to find any fix or enhancement needed
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です