Skip to content

About

一个基于 PPStructureV3 的 PDF 转 Markdown 项目,重点解决复杂文档中的标题层级丢失、表格结构破坏、公式识别不稳、图片与图表信息缺失、以及阅读顺序错乱等问题,输出更适合检索、RAG、知识库构建和二次处理的结构化 Markdown。

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

PPStructureV3 PDF to Markdown

A PPStructureV3-based PDF to Markdown tool focused on accurate structure recovery for complex documents.

This repository contains two conversion paths:

  • pdf_to_md_robust.py: a general PDF to Markdown pipeline for structure-oriented export.
  • omnidocbench_ppstructurev3_end2end.py: an OmniDocBench-oriented exporter tuned for end-to-end benchmark evaluation.

What It Tries To Fix

  • Lost title hierarchy after PDF parsing
  • Broken table structure after export
  • Wrong reading order in multi-column or mixed-layout pages
  • Missing formulas, images, and chart content in Markdown output

Key Features

  • Structure-aware Markdown reconstruction based on PPStructureV3
  • Better title, table, formula, image, and reading-order preservation
  • Table export in benchmark-friendly HTML form when needed
  • Slide-style bullet recovery for PPT-derived pages
  • Optional OmniDocBench official end-to-end evaluation wrapper

Files

  • pdf_to_md_robust.py: robust converter for local PDF workflows
  • run_to_md.py: simple entry for the robust converter
  • omnidocbench_ppstructurev3_end2end.py: benchmark-focused exporter for OmniDocBench demo pages

Quick Start

Install the required runtime first:

pip install paddleocr

Run the robust local converter:

python run_to_md.py "your.pdf" -o ./pp_output

Run the OmniDocBench exporter:

python omnidocbench_ppstructurev3_end2end.py --clean-output --run-eval --output-dir ./omnidocbench_ppstructurev3_end2end_output

OmniDocBench Demo Result

Compared with the repository demo baseline on the OmniDocBench demo set:

Metric Baseline This Project
Text Block Edit Distance 0.3513 0.0479
Display Formula Edit Distance 0.3189 0.1568
Table TEDS 0.7838 0.8322
Table Edit Distance 0.2027 0.0826
Reading Order Edit Distance 0.1613 0.0128

Notes:

  • Edit_dist is lower-is-better.
  • TEDS is higher-is-better.

Repository Description

PPStructureV3-based PDF to Markdown converter with robust layout, table, and formula recovery.

About

一个基于 PPStructureV3 的 PDF 转 Markdown 项目,重点解决复杂文档中的标题层级丢失、表格结构破坏、公式识别不稳、图片与图表信息缺失、以及阅读顺序错乱等问题,输出更适合检索、RAG、知识库构建和二次处理的结构化 Markdown。

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages