ocr-and-documents

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

Updated Aug 21, 2026
One-click install
npx skills add https://github.com/ewtodd/son-of-anton --skill ocr-and-documents-ewtodd
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ocr-and-documents
Source: https://github.com/ewtodd/son-of-anton/tree/main/skills/productivity/ocr-and-documents
Command: npx skills add https://github.com/ewtodd/son-of-anton --skill ocr-and-documents-ewtodd

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: text-based PDFs need a lightweight parser, while scanned pages, equations, and complex layouts require full OCR. This Skill routes each document to the right extractor so you get clean text or Markdown without guessing which tool fits. ## Core Features & Use Cases - Tiered extraction: Try web_extract for remote URLs first, then pymupdf for text-based PDFs, then marker-pdf for scanned documents, equations, forms, and complex layouts. - Structured output: Extract plain text, Markdown, tables, embedded images, and document metadata, with page-range selection for large files. - PDF utilities: Split, merge, and search PDFs natively with pymupdf, no extra dependencies. - Use Case: You receive a scanned 40-page lab report as a PDF. The Skill detects that the text layer is empty, checks disk space, and runs marker-pdf OCR to produce Markdown with equations and tables intact. ## Quick Start Extract the text from the attached PDF report.pdf, using OCR if any pages are scanned images.

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. It installs in about 25MB, runs instantly, and handles text-based PDFs, tables, images, and metadata without downloading models.

pymupdf vs marker-pdf for PDF extraction?▼

pymupdf is the default for text-based PDFs: lightweight, fast, and dependency-free. marker-pdf is needed for scanned documents, OCR in 90+ languages, equations, forms, and complex layouts, but requires roughly 3-5GB for PyTorch and models.

How do I OCR a scanned PDF that has no text layer?▼

Use marker-pdf, which performs OCR on scanned pages and outputs Markdown with tables and equations. For only a few pages, render them with pdftoppm at 150 DPI and run vision analysis on each image instead.

Does pymupdf work on scanned documents or equations?▼

No. pymupdf reads only the embedded text layer, so scanned images, equations, and forms yield nothing. Those cases require marker-pdf's OCR and layout analysis, or per-page image rendering with a vision model.

Why does marker-pdf installation fail or take so long?▼

marker-pdf pulls in PyTorch and downloads about 2.5GB of models to the HuggingFace cache on first use, needing roughly 5GB of free disk. Run the extract_marker.py --check flag first to verify disk space before installing.

How do I extract text from an arxiv paper?▼

Pass the arxiv URL to web_extract, which converts the PDF to Markdown via Firecrawl with no local dependencies. Use the abs page for just the abstract or the pdf URL for the full paper.