ocr-and-documents

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

Updated May 18, 2026
One-click install
npx skills add https://github.com/ossoolli/Nexum-Core --skill ocr-and-documents-ossoolli
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ocr-and-documents
Source: https://github.com/ossoolli/Nexum-Core/tree/main/skills/productivity/ocr-and-documents
Command: npx skills add https://github.com/ossoolli/Nexum-Core --skill ocr-and-documents-ossoolli

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 image-only scans, and each requires different tooling. This Skill provides a clear decision workflow for choosing between lightweight extraction (pymupdf) and high-quality OCR (marker-pdf), plus ready-to-run scripts for both. ## Core Features & Use Cases - Dual extraction paths: Use pymupdf (~25MB, instant) for text-based PDFs, or marker-pdf (~3-5GB) for scanned documents, equations, forms, and complex layouts across 90+ languages. - Rich output options: Extract plain text, Markdown, tables, embedded images, and document metadata, with support for page ranges and batch processing. - PDF manipulation: Split, merge, and search PDFs natively with pymupdf, no extra dependencies required. - Use Case: You receive a scanned 50-page contract as a PDF. The Skill detects it needs OCR, checks disk space, and runs marker-pdf to produce clean Markdown with preserved tables and reading order. ## Quick Start Extract the text from my local file report.pdf and convert it to Markdown, using OCR if the document is scanned.

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 page.get_text() for each page, or pymupdf4llm to convert directly to Markdown. For scanned PDFs without a text layer, use marker-pdf which performs OCR across 90+ languages.

pymupdf vs marker-pdf: which should I use for PDF extraction?▼

Use pymupdf (~25MB, instant) for text-based PDFs, basic tables, and image extraction. Use marker-pdf (~3-5GB with PyTorch) when you need OCR for scanned documents, equation/LaTeX recognition, forms, or reading order detection.

Can pymupdf extract text from scanned PDF documents?▼

No, pymupdf cannot perform OCR on scanned PDFs since they contain images rather than text layers. Use marker-pdf instead, which includes OCR support for over 90 languages and handles scanned documents natively.

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

Use pymupdf's insert_pdf method to copy page ranges into a new document for splitting, or combine multiple source documents into one for merging. No additional dependencies beyond pymupdf are needed for these operations.

Why does marker-pdf installation fail or require so much disk space?▼

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

How do I extract tables from a PDF into a usable format?▼

Use pymupdf's page.find_tables() method to detect tables and convert them to pandas DataFrames, then export as Markdown. For complex or scanned tables, marker-pdf provides higher accuracy table recognition.