ocr-and-documents

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

5|2|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/AjayRajan05/VoiceOS --skill ocr-and-documents-ajayrajan05
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ocr-and-documents
Source: https://github.com/AjayRajan05/VoiceOS/tree/main/skills/bundled/community/productivity/ocr-and-documents
Command: npx skills add https://github.com/AjayRajan05/VoiceOS --skill ocr-and-documents-ajayrajan05

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 routes each document to the right extractor and handles tables, equations, images, and metadata. ## Core Features & Use Cases - Dual-extractor routing: Uses lightweight pymupdf (~25MB) for text-based PDFs and marker-pdf for scanned documents, OCR in 90+ languages, equations, forms, and complex layouts. - URL-first extraction: Tries web_extract for remote documents (including arXiv papers) before falling back to local processing. - PDF manipulation: Splits, merges, and searches PDFs natively with pymupdf, plus table, image, and metadata extraction via helper scripts. - Use Case: You receive a scanned 50-page contract as a PDF. The Skill detects it needs OCR, checks disk space, runs marker-pdf, and returns clean Markdown with preserved layout. ## Quick Start Extract the text from the attached 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 get_text() on each page, or pymupdf4llm for Markdown output. For scanned PDFs without a text layer, use marker-pdf which performs OCR across 90+ languages.

pymupdf vs marker-pdf for PDF extraction?▼

pymupdf is lightweight (~25MB), instant, and handles text-based PDFs, tables, and images. marker-pdf (~3-5GB with PyTorch) adds OCR for scanned documents, equation and LaTeX extraction, forms, and reading-order detection.

Can pymupdf extract text from scanned PDFs?▼

No, pymupdf cannot perform OCR on scanned documents or convert images to text. For scanned PDFs, use marker-pdf, which includes OCR support for over 90 languages plus layout analysis.

How do I extract tables from a PDF document?▼

pymupdf's find_tables() method detects tables on each page and converts them to pandas DataFrames for basic table extraction. For higher accuracy on complex tables, marker-pdf provides better structural recognition.

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

marker-pdf requires roughly 5GB of disk space for PyTorch and its models, plus about 2.5GB of models downloaded to the HuggingFace cache on first use. Check free disk space with the --check flag before installing.

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

pymupdf handles both natively with no extra dependencies. Use insert_pdf() to copy pages between documents for splitting, or loop through multiple files inserting each into a new document to merge them.