pdf-conversion

Convert PDF documents into structured Markdown with layout-aware extraction.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/yjang-git/HoneyPot --skill pdf-conversion-yjang-git
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf-conversion
Source: https://github.com/yjang-git/HoneyPot/tree/main/plugins/pdf-md-generator/skills/pdf-conversion
Command: npx skills add https://github.com/yjang-git/HoneyPot --skill pdf-conversion-yjang-git

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pymupdf, pdfplumber, torch, transformers, bitsandbytes, pillow, requests, urllib3, and includes scripts (resource) components.

What problem does it solve?

Converts complex, multi-column, table- and equation-heavy PDF documents into clean, structured Markdown so that technical content becomes editable, searchable, and versionable without manual retyping.

Core Features & Use Cases

  • 2-column layout detection and correct reading order extraction for academic and standards documents.
  • Robust table detection and caption extraction with multiple strategies to recover heading-anchored and whitespace-aligned tables.
  • Equation fragment merging and LaTeX conversion with symbol-font mapping, ligature expansion, and equation numbering preservation.
  • Vector graphic detection and image extraction into a per-PDF images folder, plus watermark removal and bullet splitting.
  • Optional VLM-based visual verification step to correct OCR/structure errors using an image+draft Markdown comparison.
  • Use Case: Batch-convert a folder of technical PDFs (ASTM reports, papers, manuals) into Markdown with images and equations preserved for archival or publication workflows.

Quick Start

Run the relative script to convert a folder of PDFs by executing TMP=D:/AI/temp TEMP=D:/AI/temp python scripts/pdf_to_md.py -i "{input_dir}".

Frequently Asked Questions about pdf-conversion

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

FAQPage Schema
How do I convert multi-column PDF documents with tables into Markdown?

To convert multi-column PDFs with tables into Markdown, this tool uses layout-aware extraction via PyMuPDF and pdfplumber to detect reading order and isolate tables. It processes technical documents by preserving structural hierarchy and extracting captions.

Does PDF to Markdown conversion preserve LaTeX equations and inline symbols?

PDF to Markdown conversion preserves LaTeX equations by merging equation fragments, expanding ligatures, and applying symbol-font mapping. It maintains equation numbering and correctly formats inline mathematical symbols for technical and academic documents.

Can I batch convert a folder of technical PDFs to Markdown automatically?

You can batch convert a folder of technical PDFs to Markdown automatically by running the provided Python script. It processes multiple files sequentially, extracting text, tables, and vector graphics into structured Markdown with per-page verification.

Do I need PyTorch and Transformers to extract text from PDFs?

You do not need PyTorch and Transformers for basic PDF text extraction, as PyMuPDF and pdfplumber handle standard parsing. Torch, Transformers, and BitsAndBytes are optional dependencies used only for VLM-based visual verification to correct OCR structural errors.

What is the best way to extract images and watermarks from PDFs during Markdown conversion?

The best way to extract images during Markdown conversion is through vector graphic detection, which isolates images into a dedicated folder. The process also includes watermark removal and bullet splitting to clean the final Markdown output.

Why does my PDF table extraction lose alignment in Markdown output?

PDF table extraction loses alignment when standard parsers fail to detect heading-anchored or whitespace-aligned tables. This tool resolves alignment issues using multiple robust table detection strategies to accurately recover complex table structures.