AGENT SKILL
PDF文档提取与编辑
document-processing-tools
从文档中提取和编辑文本:PDF OCR、扫描件清理,以及使用 nano-pdf 直接编辑文本。
- License 许可
- MIT
- 最近更新
- 2026-11-06
- Stars
- ★ 5
- Forks
- 4
01 前言 Front Matter
- name
- document-processing-tools
- author
- Hermes Agent
- license
- MIT
- version
- 1.0.0
- metadata
- { "hermes": { "tags": [ "pdf", "ocr", "documents", "extraction", "editing" ], "related_skills": [ "research-tools" ] } }
- platforms
- [ "linux", "macos", "windows" ]
- description
- Extract and edit text from documents: PDF OCR, scan cleanup, and direct text editing with nano-pdf.
03 SKILL.md 正文
Document Processing Tools
Two complementary approaches: extraction/cleanup (ocr-and-documents) and direct text editing (nano-pdf).
OCR and Document Extraction
Extract text from PDFs and scanned images with Python libraries.
pymupdf (fitz)
import fitz # PyMuPDF
doc = fitz.open("document.pdf")
for page in doc:
text = page.get_text()
print(text)
marker-pdf (High-Quality Markdown)
marker_single document.pdf --output_dir ./extracted/
# Produces clean markdown with preserved structure
OCR for Scans
import pytesseract
from PIL import Image
import pdf2image
images = pdf2image.convert_from_path("scan.pdf")
for img in images:
text = pytesseract.image_to_string(img)
print(text)
Use Cases
- Ingest arXiv PDFs into
llm-wiki - Extract text from scanned contracts or forms
- Batch-convert document archives to searchable markdown
nano-pdf (Direct Text Editing)
Edit PDF text, typos, and titles via natural-language prompts with the nano-pdf CLI.
Install
pip install nano-pdf
Edit Text
nano-pdf edit document.pdf --prompt "Fix the typo 'recieve' to 'receive' on page 3"
Edit Titles
nano-pdf edit document.pdf --prompt "Change the title on page 1 to 'Q3 Report'"
Batch Processing
nano-pdf batch ./reports/ --prompt "Standardize all dates to ISO 8601"
Pitfalls
- nano-pdf works best on text-based PDFs; scanned images need OCR first
- Complex layouts (multi-column, tables) may shift during editing
- Always review output before overwriting originals
Workflow: Scan → Extract → Edit → Archive
- Scan:
ocr-and-documentsextracts raw text from PDF/image - Clean: LLM fixes formatting, typos, structure
- Edit:
nano-pdfapplies targeted changes to the original PDF - Archive: Save to
llm-wikior document management system
04 同仓库更多 Skills
网页抓取受阻恢复
blocked-page-recovery
当抓取失败时使用:403/429 状态码、付费墙(paywall)、WAF、机器人验证墙(bot wall)。
★ 5
软件实施计划编写
writing-plans
在创建或更新可执行的软件计划时使用。除非用户明确要求将计划注册到 Doct,否则请将计划保留为本地文件。
★ 5
测试驱动开发
test-driven-development
TDD:强制执行「红-绿-重构」(RED-GREEN-REFACTOR)循环,先写测试再写代码。
★ 5
系统化根因调试
systematic-debugging
四阶段根因调试:先理解缺陷,再着手修复。
★ 5
技术预研验证
spike
在正式构建前,通过一次性(可丢弃的)实验来验证某个想法。
★ 5
代码变更并行清理精简
simplify-code
并行使用 3 个智能体(agent)对近期代码变更进行清理精简。
★ 5