PDF Utils

👤 wangwllu 📦 v1.0.1 ⭐ 4.5 ⬇️ 871 下載
📄 辦公效率 免費

📖 技能介紹


name: pdf-utils description: PDF processing skill for PyMuPDF and Tesseract workflows: OCR image-based PDFs, extract arXiv IDs from PDF text/OCR output, and handle scriptable PDF utility tasks when the built-in pdf tool is not enough. Use when working with scanned PDFs, OCR, arXiv reference mining, or repeatable local PDF-processing scripts.


PDF Utils

Use this skill for local, scriptable PDF processing. It is a stable 1.x skill for OCR, arXiv reference mining, and repeatable PyMuPDF workflows. Prefer the built-in pdf tool for AI-style reading, summarization, question-answering, and semantic analysis of PDF content.

Choose the right tool

  • Use the built-in pdf tool for summary, Q&A, extraction by meaning, or general document understanding.
  • Use scripts/extract_refs.py when the PDF already has extractable text and you need arXiv IDs or batch downloads.
  • Use scripts/ocr_pdf.py when the PDF is scanned/image-based and text extraction is poor or empty.
  • Use scripts/pdf_ops.py for repeatable local PDF operations such as merge, split, and rendering a page to an image.

Core workflows

Extract arXiv IDs from a text PDF

Run:

python3 scripts/extract_refs.py paper.pdf

If needed, download the referenced papers:

python3 scripts/extract_refs.py paper.pdf --download --out ~/papers/

OCR a scanned PDF

Run OCR on all pages:

python3 scripts/ocr_pdf.py paper.pdf --all

To OCR and immediately extract arXiv IDs from the OCR output:

python3 scripts/ocr_pdf.py paper.pdf --all --extract-refs

Dependencies

Install these before using OCR features:

brew install tesseract
brew install tesseract-lang
pip3 install pytesseract Pillow pymupdf --break-system-packages

推薦訪問7w4.net獲取更多AI技能。

Read more only if needed

  • Read references/usage.md for CLI examples, programmatic API notes, PDF ops usage, and known limits.
  • Read the scripts directly if you need to patch behavior or reuse helper functions.

Practical guidance

  • For very large PDFs, OCR in page ranges or batches instead of all at once.
  • For handwritten or low-resolution scans, expect OCR quality to drop.
  • If a PDF yields partial references, inspect the reference pages first instead of assuming extraction is complete.
  • For merge/split/page rendering, use scripts/pdf_ops.py first before writing one-off snippets.

🤖 AI 評測

這個 Skill 質量不錯,做得很實用。它能處理掃描版 PDF 文字識別、從論文中提取參考文獻並下載、合併拆分 PDF 等常見需求,文件寫得清楚易懂。程式碼穩定可靠,錯誤處理也比較周全。唯一需要注意的是 OCR 功能需要額外安裝 Tesseract 軟體,安裝說明對 Mac 使用者友好但其他系統使用者可能需要自己查詢方法。總體來說這是一個值得信賴的 PDF 處理工具。

📊 多維度評分

適應性4.4
規範性4.3
有效性4.7
可靠性4.6
可信度4.5

📁 包含檔案 (13 個)

📄 README.md 2.7 KB
📄 SKILL.md 2.3 KB
📄 _meta.json 128 B
📄 pyproject.toml 1.1 KB
📄 references/usage.md 2.5 KB
📄 scripts/__init__.py 40 B
📄 scripts/arxiv_utils.py 552 B
📄 scripts/extract_refs.py 7.9 KB
📄 scripts/ocr_pdf.py 7 KB
📄 scripts/pdf_ops.py 3.5 KB
📄 tests/test_arxiv_utils.py 492 B
📄 tests/test_extract_refs.py 408 B
📄 tests/test_pdf_ops.py 966 B