pdf-conversion

Convert PDFs to Markdown with preserved formatting and embedded images.

10|3|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/rangerrick337/operator-os --skill pdf-conversion
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf-conversion
Source: https://github.com/rangerrick337/operator-os/tree/main/3.%20Skills/pdf-conversion
Command: npx skills add https://github.com/rangerrick337/operator-os --skill pdf-conversion

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires PyMuPDF, pymupdf4llm, and includes scripts (resource) components.

What problem does it solve?

This Skill automates the tedious task of converting PDFs into readable, Markdown-formatted documents, preserving structure and media while cutting manual reformatting time.

Core Features & Use Cases

  • PDF to Markdown conversion with preserved headings, lists, and formatting.
  • Image extraction and embedding in the Markdown output.
  • Table detection and faithful rendering in Markdown, across single files or batches.
  • Use Case: Digitize reports, research papers, and invoices by converting PDFs to searchable Markdown.

Quick Start

Run the converter on a PDF: python3 scripts/pdf_to_md.py /path/to/input.pdf /path/to/output.md assets/

Frequently Asked Questions about pdf-conversion

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

FAQPage Schema
How do I convert a PDF to Markdown while preserving tables and images?

To convert a PDF to Markdown with preserved tables and images, run the provided Python script using the PyMuPDF and pymupdf4llm libraries. The script parses the PDF structure, extracts embedded images to an assets folder, and renders the output as clean Markdown.

What is the best way to batch convert PDF reports into searchable Markdown?

Batch converting PDF reports into searchable Markdown is handled by applying the conversion script across multiple files. This process uses pymupdf4llm to parse document archives and generate structured Markdown, enabling content teams to digitize large volumes efficiently.

Does PyMuPDF support OCR fallback for scanned PDFs during Markdown conversion?

Yes, the PDF to Markdown conversion process includes an optional OCR fallback powered by the pymupdf4llm library. This allows you to extract text from scanned PDFs and digitize image-based reports or invoices into searchable Markdown documents.

Can I extract images from a PDF and embed them in Markdown output?

You can extract images from a PDF and embed them in Markdown by specifying an output directory for assets when running the conversion script. The PyMuPDF library parses the PDF media and pymupdf4llm generates the corresponding Markdown image links.

Do I need Python libraries to convert PDFs to Markdown format?

Yes, you need the PyMuPDF (fitz) and pymupdf4llm Python libraries installed to convert PDFs to Markdown. These dependencies are required to parse the PDF structure, detect tables, and generate the final formatted Markdown text.

Why does my PDF to Markdown conversion lose formatting on complex documents?

PDF to Markdown conversion may lose formatting on complex documents when the parser encounters non-standard layouts or corrupted structures. The tool relies on pymupdf4llm for heading and table detection, so heavily image-based PDFs require the optional OCR fallback to ensure accurate text extraction.