ocr-and-documents

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

Updated Jun 8, 2026
One-click install
npx skills add https://github.com/raulisai/eva02 --skill ocr-and-documents-raulisai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ocr-and-documents
Source: https://github.com/raulisai/eva02/tree/main/apps/eva-core/src/skills/productivity/ocr-and-documents
Command: npx skills add https://github.com/raulisai/eva02 --skill ocr-and-documents-raulisai

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 decision workflow that routes each document to the right extractor. ## Core Features & Use Cases - Tiered extraction strategy: Try web_extract first for remote URLs, then pymupdf for lightweight local extraction, then marker-pdf for OCR, equations, forms, and complex layouts. - Full PDF operations: Extract text, Markdown, tables, embedded images, and metadata, plus split, merge, and search PDFs using pymupdf alone. - High-quality OCR: marker-pdf handles scanned documents in 90+ languages, LaTeX equations, and reading-order detection, with optional LLM-boosted accuracy. - Use Case: You receive a scanned contract PDF. The Skill checks disk space, runs marker-pdf OCR, and returns clean Markdown with the document's structure preserved. ## Quick Start Extract the text from the attached scanned PDF and convert it to Markdown, using OCR if the document has no text layer.

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 pymupdf4llm for Markdown output. The included extract_pymupdf.py script handles text, tables, images, metadata, and page ranges via command-line flags.

pymupdf vs marker-pdf for PDF extraction?

pymupdf is lightweight (~25MB) and instant, handling text-based PDFs, tables, and images. marker-pdf (~3-5GB with PyTorch) adds OCR for scanned documents in 90+ languages, equation recognition, and complex layout analysis.

How do I extract text from a scanned PDF?

Scanned PDFs require OCR since they contain images rather than text layers. Use marker-pdf via the extract_marker.py script, which performs OCR in over 90 languages and outputs structured Markdown.

Does pymupdf support OCR for scanned documents?

No, pymupdf cannot perform OCR on scanned documents or convert images to text. It extracts embedded images and existing text layers only. For OCR, equations, or forms, use marker-pdf instead.

Why does marker-pdf fail to install or run?

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

How do I split or merge PDF files in Python?

pymupdf handles splitting and merging natively with insert_pdf to copy page ranges between documents. No extra dependencies are needed beyond pymupdf itself.