mcpField
P
pymupdf-pdf

pymupdf-pdf

github.com/kesslerioDocuments156 installsUpdated 15w ago
Repository

About pymupdf-pdf

A document-processing skill that uses PyMuPDF to parse PDFs locally and extract content to Markdown by default. It also supports JSON output and optional image and rough table extraction.

Key features

  1. 01Parses PDFs locally with PyMuPDF
  2. 02Exports Markdown, JSON, or both
  3. 03Optionally extracts images
  4. 04Produces rough line-based table JSON
  5. 05Adds a language hint to JSON metadata

Use cases

  1. 01Extracting PDF text into Markdown
  2. 02Generating JSON output from a PDF
  3. 03Saving embedded images from a PDF
  4. 04Creating a rough table-data extraction

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/kesslerio/pymupdf-pdf-parser-openclaw-skill --skill pymupdf-pdf

After installing, type/pymupdf-pdfin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

CHANGELOG.md
.gitignore
LICENSE
VERSION
README.md
references/
pymupdf-notes.md
scripts/
pymupdf_parse.py

Details

From the project README

PyMuPDF PDF

Overview

Parse PDFs locally using PyMuPDF for fast, lightweight extraction into Markdown by default, with optional JSON and image/table outputs in a per-document directory.

Prereqs / when to read references

If you hit import errors (PyMuPDF not installed) or Nix libstdc++ issues, read:

  • references/pymupdf-notes.md

Quick start (single PDF)

# Run from the skill directory
./scripts/pymupdf_parse.py /path/to/file.pdf \
  --format md \
  --outroot ./pymupdf-output

Options

  • --format md|json|both (default: md)
  • --images to extract images
  • --tables to extract a simple line-based table JSON (quick/rough)
  • --outroot DIR to change output root
  • --lang adds a language hint into JSON output metadata

Output conventions

  • Create ./pymupdf-output/<pdf-basename>/ by default.
  • Markdown output: output.md
  • JSON output: output.json (includes lang)
  • Images: images/ subdir
  • Tables: tables.json (rough line-based)

Notes

  • PyMuPDF is fast but less robust on complex PDFs.
  • For more robust parsing, use a heavy-duty OCR parser (e.g., MinerU) if installed.

Comments

Markdown supported