pdf-to-markdown

Convert PDF documents to structured Markdown with table and image extraction.

52|13|Updated Nov 26, 2025
One-click install
npx skills add https://github.com/aliceisjustplaying/claude-skill-pdf-to-markdown --skill pdf-to-markdown-aliceisjustplaying
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pdf-to-markdown
Source: https://github.com/aliceisjustplaying/claude-skill-pdf-to-markdown
Command: npx skills add https://github.com/aliceisjustplaying/claude-skill-pdf-to-markdown --skill pdf-to-markdown-aliceisjustplaying

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Loading full PDF content into an AI conversation is difficult: copy-paste loses formatting, grep misses context, and page-by-page reading is slow. This Skill converts entire PDFs into clean, structured Markdown so the complete document—text, tables, and images—can be loaded into context at once. ## Core Features & Use Cases - Full-document conversion: Extracts headers, bold/italic formatting, lists, multi-column layouts, and code blocks into Markdown using PyMuPDF. - Two table extraction modes: Fast mode with PyMuPDF for simple tables, and a high-accuracy mode using IBM Docling's TableFormer AI for complex or borderless tables. - Image extraction with caching: Images are saved next to the output file with relative paths, and results are aggressively cached in ~/.cache/pdf-to-markdown/ so repeat conversions are instant. - Use Case: A researcher wants to discuss a 40-page paper with an AI assistant. They run the converter once, then load the resulting Markdown file—complete with figures and tables—directly into the conversation. ## Quick Start Ask the AI to convert your PDF to Markdown and load the entire document into context, for example: "Convert report.pdf to Markdown and read the whole thing."

Frequently Asked Questions about pdf-to-markdown

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

FAQPage Schema
How do I convert a PDF to Markdown in Python?▼

Run the pdf_to_md.py script with the PDF path as an argument, and it writes a Markdown file next to the source. It uses pymupdf4llm to preserve headers, formatting, lists, and tables, and extracts images into an images folder.

What is the best way to extract tables from PDF files?▼

For simple tables, PyMuPDF's text-based table strategy is fast and effective. For complex, borderless, or merged-cell tables, use the --docling flag, which runs IBM's TableFormer AI model for higher accuracy at roughly one second per page.

PyMuPDF vs Docling for PDF extraction, which should I use?▼

PyMuPDF is the default fast mode and handles most documents instantly. Docling is slower and downloads about 500MB of AI models on first run, but produces better results for complex tables and higher-resolution images.

Does PDF to Markdown conversion work on scanned documents?▼

Scanned PDFs contain images rather than text layers, so standard extraction yields little text. The documentation recommends installing Tesseract OCR (brew install tesseract) to handle scanned content.

Why is my PDF conversion slow the first time but instant later?▼

Results are cached in ~/.cache/pdf-to-markdown/ keyed by file content hash and extraction mode. The first extraction does the full work; subsequent runs load from cache unless the PDF changes or you pass --clear-cache.

How do I fix missing module errors like pymupdf4llm not found?▼

The skill uses a dedicated virtual environment that may not exist yet. Recreate it with uv venv .venv followed by uv pip install of pymupdf and pymupdf4llm inside the skill directory, as shown in the troubleshooting section.