ocr-and-documents

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

1|Updated Aug 11, 2026
One-click install
npx skills add https://github.com/Chia1104/agent-air --skill ocr-and-documents-chia1104
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ocr-and-documents
Source: https://github.com/Chia1104/agent-air/tree/main/skills/hermes/productivity/ocr-and-documents
Command: npx skills add https://github.com/Chia1104/agent-air --skill ocr-and-documents-chia1104

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 is inconsistent: text-based PDFs need a lightweight parser, while scanned documents, 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 strategy: Try web_extract for remote URLs first, then pymupdf for text-based PDFs, then marker-pdf for scanned documents, OCR in 90+ languages, equations, and complex layouts. - Structured output: Extract plain text, Markdown, tables, embedded images, and document metadata, with page-range selection for targeted extraction. - PDF utilities: Split, merge, and search PDFs natively with pymupdf, plus disk-space checks before installing the multi-gigabyte marker-pdf stack. - Use Case: You receive a scanned 40-page report as a PDF. The Skill detects that the text layer is empty, verifies disk space, and runs marker-pdf OCR to produce clean Markdown with tables and reading order preserved. ## Quick Start Extract the text from the attached scanned report.pdf into Markdown, using OCR if the pages have 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 scanned PDF in Python?▼

Use marker-pdf, which performs OCR in over 90 languages on scanned PDFs and outputs Markdown. Run the extract_marker.py script on the file, but verify you have about 5GB of free disk space first for PyTorch and the models.

pymupdf vs marker-pdf for PDF text extraction?▼

pymupdf is a lightweight ~25MB library that instantly extracts text, tables, and images from text-based PDFs. marker-pdf is a 3-5GB PyTorch-based tool needed for scanned documents, OCR, equations, forms, and complex layout analysis.

Why does my PDF extraction return empty pages?▼

Empty output means those pages are scanned images with no text layer, which pymupdf cannot read. Either render the pages with pdftoppm and analyze them with a vision model, or run marker-pdf for bulk OCR of the document.

Can I extract tables and equations from PDFs?▼

pymupdf handles basic table detection via page.find_tables() and exports to pandas DataFrames. For high-accuracy tables, LaTeX equations, and code blocks, use marker-pdf, which preserves these structures in its Markdown output.

How do I extract text from a PDF hosted at a URL?▼

Call web_extract with the PDF URL first, which converts remote PDFs to Markdown via Firecrawl with no local dependencies. Only fall back to local pymupdf or marker-pdf extraction when the file is local or web_extract fails.

What are the limitations of pymupdf for document parsing?▼

pymupdf cannot perform OCR on scanned images, detect reading order, remove headers and footers, or parse equations and forms. For those cases, switch to marker-pdf, which handles complex layouts at the cost of a much larger installation.