ocr-and-documents

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

1|Updated Feb 17, 2026
One-click install
npx skills add https://github.com/brittb-dev/zerogravityclaw --skill ocr-and-documents-brittb-dev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ocr-and-documents
Source: https://github.com/brittb-dev/zerogravityclaw/tree/main/src/hermes-core/skills/productivity/ocr-and-documents
Command: npx skills add https://github.com/brittb-dev/zerogravityclaw --skill ocr-and-documents-brittb-dev

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 difficult: text-based PDFs need parsing, scanned files need OCR, and complex layouts with tables or equations break naive extractors. This Skill routes each document to the right extraction method so you get clean text or Markdown without manual copy-pasting. ## Core Features & Use Cases - Tiered extraction strategy: Try web_extract for remote URLs first, then lightweight pymupdf for text-based PDFs, then marker-pdf for scanned documents, OCR in 90+ languages, equations, and complex layouts. - Full PDF manipulation: Split, merge, and search PDFs natively with pymupdf, plus extract tables, embedded images, and document metadata. - Use Case: You receive a scanned 50-page contract as a PDF. The Skill checks disk space, runs marker-pdf OCR, and returns structured Markdown with tables and reading order preserved. ## Quick Start Extract the text from the attached scanned PDF report and convert it to Markdown, preserving any tables.

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. For remote PDF URLs, try web_extract first since it handles PDF-to-markdown conversion with no local dependencies.

pymupdf vs marker-pdf for PDF extraction?▼

pymupdf is lightweight at ~25MB, runs instantly, and handles text-based PDFs, tables, and images. marker-pdf needs ~3-5GB for PyTorch and models but adds OCR for scanned documents, equations, forms, and reading order detection.

Can I extract text from a scanned PDF?▼

Scanned PDFs require OCR, which pymupdf does not support. Use marker-pdf, which performs OCR in over 90 languages and outputs Markdown with layout analysis, at roughly 1-14 seconds per page on CPU.

How do I merge or split PDF files with pymupdf?▼

Open the source PDFs with pymupdf, create a new empty document, and use insert_pdf() to copy selected pages or entire files, then save the result. No extra dependencies are needed beyond pymupdf itself.

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

marker-pdf requires ~5GB of free disk for PyTorch plus ~2.5GB of models downloaded to the HuggingFace cache on first use. Run the extract_marker.py --check flag first to verify disk space, or fall back to pymupdf for text-based PDFs.