ocr-and-documents

Extract text, tables, and images from PDFs and scanned documents using pymupdf or marker-pdf.

14|5|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/MLT-OSS/hermes-agent-go --skill ocr-and-documents-mlt-oss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ocr-and-documents
Source: https://github.com/MLT-OSS/hermes-agent-go/tree/main/skills/productivity/ocr-and-documents
Command: npx skills add https://github.com/MLT-OSS/hermes-agent-go --skill ocr-and-documents-mlt-oss

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pymupdf, pymupdf4llm, marker-pdf, and includes scripts (resource) components.

What problem does it solve? Getting usable text out of PDFs and scanned documents is inconsistent: some files are text-based, others are scanned images requiring OCR, and choosing the wrong tool wastes time or fails entirely. This Skill provides a clear decision workflow for extracting content from any PDF or document. ## Core Features & Use Cases - Tiered extraction strategy: Try web_extract for remote URLs first, then pymupdf for lightweight local text extraction, then marker-pdf for OCR, equations, forms, and complex layouts. - Full PDF manipulation: Split, merge, and search PDFs natively with pymupdf, plus extract tables, images, and metadata via helper scripts. - Use Case: You download a scanned research paper from arXiv. The Skill routes you to web_extract for the URL, or to marker-pdf for local OCR with markdown output, preserving equations and tables. ## Quick Start Extract the text from my local file report.pdf and convert it to markdown.

Frequently Asked Questions about ocr-and-documents

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract text from a PDF in Python?

Use pymupdf to open the PDF and call get_text() on each page, or use pymupdf4llm to convert directly to markdown. For remote PDF URLs, try web_extract first since it handles PDF-to-markdown conversion without local dependencies.

pymupdf vs marker-pdf for PDF extraction?

pymupdf is lightweight (~25MB) and instant, handling text-based PDFs, tables, and image extraction. marker-pdf (~3-5GB with PyTorch) adds OCR for scanned documents in 90+ languages, equation recognition, forms, and reading-order detection.

Can pymupdf extract text from scanned PDFs?

No, pymupdf cannot perform OCR on scanned documents. For scanned PDFs you need marker-pdf, which includes OCR support for over 90 languages, or use web_extract if the document is available at a remote URL.

How do I extract text from a DOCX file?

Use python-docx, which parses the actual document structure rather than relying on OCR. Install it with pip install python-docx. For PPTX files, use the powerpoint skill built on python-pptx.

Why does marker-pdf fail to install or run?

marker-pdf requires roughly 5GB of free disk space for PyTorch and its models, plus about 2.5GB of models downloaded to ~/.cache/huggingface/ on first use. Run the extract_marker.py script with --check to verify disk space before installing.

How do I split or merge PDF files in Python?

pymupdf handles splitting and merging natively with no extra dependencies. Use insert_pdf to copy page ranges into a new document for splitting, or combine multiple source documents into one for merging, then save the result.