pymupdf

Convert PDF documents into Markdown, JSON, and text for LLM workflows.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/Blake-John/agent-config --skill pymupdf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymupdf
Source: https://github.com/Blake-John/agent-config/tree/main/.agents/skills/pymupdf
Command: npx skills add https://github.com/Blake-John/agent-config --skill pymupdf

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pymupdf, pymupdf4llm, pymupdf-layout, and includes scripts (resource) components.

What problem does it solve?

This skill transforms PDFs into machine-friendly outputs (Markdown/JSON/Text) to streamline data extraction and content processing for downstream LLM/RAG workflows.

Core Features & Use Cases

  • Convert PDFs to Markdown for readable content extraction and downstream processing.
  • Generate JSON with layout information for structured indexing and retrieval.
  • Extract plain text and tables from PDFs for data analytics and integration with other tools.
  • Support page selection and header/footer removal, batch processing, and CLI/Python API usage.

Quick Start

Convert a PDF to Markdown using the CLI to obtain an LLM-friendly output.

Frequently Asked Questions about pymupdf

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert PDF to Markdown for LLM and RAG workflows?

You can convert PDFs to Markdown using PyMuPDF-based libraries to parse layouts and extract readable text. This generates an LLM-friendly output that streamlines content processing for downstream RAG workflows.

How do I extract tables from PDFs as JSON for data analytics?

Extract tables from PDFs as JSON by parsing the document layout to generate structured indexing information. This provides structured data representations that integrate seamlessly with other data analytics and content processing tools.

Does PyMuPDF support batch processing and page selection for PDF extraction?

Yes, PyMuPDF supports batch processing and page selection for PDF extraction. You can specify pages and remove headers or footers during automated data extraction to obtain clean text and tables.

What is the best way to parse PDF text for automated data extraction?

The best way to parse PDF text for automated data extraction is using a Python API that transforms documents into plain text or Markdown. This approach handles layout parsing to ensure accurate archival retrieval from PDFs.

Can I use PyMuPDF with Python to generate JSON with layout information?

Yes, you can use PyMuPDF with Python to generate JSON with layout information. This allows you to capture structural document details for structured indexing and retrieval in downstream LLM applications.

What are the limitations of converting PDFs to Markdown for machine learning?

Limitations of converting PDFs to Markdown include potential layout parsing inaccuracies for complex documents. You should anticipate edge cases where header/footer removal or table extraction may not perfectly preserve the original structural layout.