ocr-and-documents

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

Updated Jul 7, 2026
One-click install
npx skills add https://github.com/jamsdoescode/Erik-s-Portfolio --skill ocr-and-documents-jamsdoescode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ocr-and-documents
Source: https://github.com/jamsdoescode/Erik-s-Portfolio/tree/main/openclicky/AppResources/OpenClicky/OpenClickyBundledSkills/ocr-and-documents
Command: npx skills add https://github.com/jamsdoescode/Erik-s-Portfolio --skill ocr-and-documents-jamsdoescode

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pymupdf, pymupdf4llm, marker-pdf, python-docx, and includes scripts (resource) components.

What problem does it solve? Getting usable text out of PDFs is inconsistent: text-based PDFs, scanned documents, equations, and complex layouts each need different tools, and choosing the wrong extractor wastes time or produces garbled output. ## 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 OCR, equations, forms, and complex layouts. - PDF manipulation: Split, merge, and search PDFs natively with pymupdf, plus extract tables, images, metadata, and specific page ranges via helper scripts. - Arxiv and research workflows: Fetch abstracts or full papers from arxiv URLs and search for papers directly. - Use Case: You receive a scanned 40-page contract PDF. The skill detects it needs OCR, checks disk space, installs marker-pdf, and converts it to clean Markdown with preserved tables and reading order. ## Quick Start Extract the text from my local file report.pdf, using OCR if it turns out to be a scanned document.

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 for Markdown output. It installs in seconds at ~25MB and handles text-based PDFs, tables, images, and metadata without model downloads.

pymupdf vs marker-pdf for PDF extraction?

pymupdf is lightweight (~25MB) and instant, handling text-based PDFs, basic tables, and embedded images. marker-pdf (~3-5GB with PyTorch) adds OCR for scanned documents in 90+ languages, equations, forms, and reading-order detection.

How do I extract text from a scanned PDF?

Scanned PDFs require OCR, which pymupdf cannot do. Use marker-pdf, which performs OCR across 90+ languages and outputs Markdown; note it downloads ~2.5GB of models to the HuggingFace cache on first use.

Can I extract text from a PDF hosted at a URL?

Yes, try web_extract on the URL first, which converts PDFs to Markdown via Firecrawl with no local dependencies. Fall back to local pymupdf or marker-pdf extraction only if web_extract fails or batch processing is needed.

How do I split or merge PDF files in Python?

pymupdf handles split and merge natively with no extra dependencies. Use insert_pdf to copy page ranges into a new document for splitting, or to combine multiple source PDFs into one merged file.

Why does marker-pdf fail to install or run?

marker-pdf requires ~5GB of free disk space for PyTorch and its models, plus ~2.5GB of model downloads on first run. Check disk space first; if space is limited, use web_extract for URLs or pymupdf for text-based PDFs.