PDF-Extract-Kit, tested on 20 image-only PDF pages
50.9%
of two-column words in reading order
Words read, columns mixed
| Reader | Scan B | Two columns |
|---|---|---|
| PDF-Extract-Kit, English model | 90.9% | 50.9% |
| Tesseract 5.5.4 | 96.0% | 99.8% |
| Our Actor | 96.0% | 97.1% |
| MinerU 4.2.1, Nov 12 | 99.7% | Not run |
Each number is the share of true words found in reading order. I ran its pdf2markdown project as shipped, but with the English model, on the Mac CPU at background priority.
- Scan B: 10 proofread book pages, 1,955 words.
- Two columns: 10 made-up pages with a scan look, 6,900 words.
- MinerU: from my MinerU test, standard tier on the Mac GPU.
26.5 sa scan B page
57.2 sa two-column page
6.6 GBpeak memory
Two columns come out mixed
The Markdown step sorts blocks by their top edge. So a block high in the right column goes before a lower block on the left:
return ymin*3000 + xmin
It still read 93.2% of the words, in any order. Its own docs say merge2markdown supports "only simple single-column text" and point to MinerU.
The default model glues English words
| True | Read as |
|---|---|
| By Blake Foster, On hold desk | ByBlakeFoster,Onholddesk |
| name of herring could one of the yacht's boats | nameofherringcouldoneoftheyacht'sboats |
pdf2markdown.yaml sets lang: ch with the Chinese PP-OCRv4
models. On one two-column page it got 6 of 729 words right.
On 3 scan B pages it got 86.3%, against 91.9% with the English model.
To switch, set lang: en and delete the
rec_model_dir line:
ocr:
model: ocr_ppocr
model_config:
lang: en
show_log: True
det_model_dir: models/OCR/PaddleOCR/det/ch_PP-OCRv4_det
det_db_box_thresh: 0.3
Some lines come out twice
It runs OCR on every text box, and some boxes sit inside others. On scan B, 43 lines were read twice.
It wrote 2,361 words for the 1,955 true words of scan B. Tesseract wrote 2,039.
Three fixes to install it in 2026
git clone https://github.com/opendatalab/PDF-Extract-Kit.git
cd PDF-Extract-Kit
uv venv -p 3.10 .venv
sed -i.bak 's/doclayout-yolo==0.0.2$/doclayout-yolo==0.0.2b1/' requirements-cpu.txt
VIRTUAL_ENV=.venv uv pip install -r requirements-cpu.txt
VIRTUAL_ENV=.venv uv pip install pyarrow==20.0.0 setuptools
- PyPI has no doclayout-yolo 0.0.2, so the install stops. The closest is 0.0.2b1.
-
datasets 2.14.4, pulled in for the formula reader, fails on pyarrow
25 with no
PyExtensionType. - A uv venv has no setuptools, and paddle imports it.
- As shipped, the code runs on the CPU on a Mac. It needs 840 MB of a 15 GB weights repo, and the command below gets only those. AGPL-3.0, like the code.
Weights download and run command
.venv/bin/python -c "
from huggingface_hub import snapshot_download
snapshot_download('opendatalab/PDF-Extract-Kit-1.0', local_dir='.',
allow_patterns=['models/Layout/YOLO/doclayout_yolo_ft.pt',
'models/MFD/YOLO/yolo_v8_ft.pt', 'models/MFR/unimernet_tiny/*',
'models/OCR/PaddleOCR/det/ch_PP-OCRv4_det/*',
'models/OCR/PaddleOCR/rec/ch_PP-OCRv4_rec/*'])"
.venv/bin/python project/pdf2markdown/scripts/run_project.py \
--config project/pdf2markdown/configs/pdf2markdown.yaml
Set inputs and outputs in the YAML first.
PaddleOCR also downloads small models into
~/.paddleocr on the first run.
MinerU took over
- The last code commit was on January 3, 2025.
- Up to version 3.4.5, MinerU downloaded its pipeline weights from PDF-Extract-Kit's weight repos.
- MinerU 4.0.0, out September 16, 2026, moved to its own weight packs.
-
pip install pdf-extract-kitgets a package uploaded from a fork, not by opendatalab. I did not test it.
For a scan in 2026, use MinerU instead. On scan B it beat every other reader in the first table, and it got 970 of 972 words in order on a two-column German page.
Same pages through our Actor
Our Apify Actor, PDF to Markdown OCR, reads scanned PDFs and returns Markdown, with nothing to install. On the two-column pages it kept 97.1% of words in order.
- $0.006 per OCR page, plus $0.00005 a run at the default 1 GB.
- Runs bill to your Apify account. Files go to Apify's servers.
- I ran its page code, build 0.1.146, with default settings on this Mac.
What I tested, and what I did not
How I tested
- Code: opendatalab/PDF-Extract-Kit at its last commit, fdb25fd4. Weights: the PDF-Extract-Kit-1.0 repo files its config names.
- Python 3.10, paddleocr 2.7.3, paddlepaddle 3.3.1, torch 2.3.1, doclayout-yolo 0.0.2b1, unimernet 0.2.1.
-
The pdf2markdown config as shipped, with visualize off. The
English runs:
lang: en, no rec_model_dir. - Scan B: 10 public domain book pages, page images at 300 ppi. The code renders every PDF page at 144 dpi.
- Two columns: 10 made-up pages, drawn in a browser and given a light scan look (small tilt, noise, JPEG), one 227 ppi gray image each, with a title, a byline and 2 columns of plain text.
- Score: true words found in order, after Unicode cleanup. Tesseract 5.5.4, eng from tessdata_fast, psm 3.
- Seconds: the whole run over its pages, model load included, with OMP_NUM_THREADS=1 at background priority (nice 19, taskpolicy -b). Two PDF-Extract-Kit runs at a time on an Apple M5 Max, shared with other jobs.
Not tested
- Formulas and tables. No test page had either.
- A GPU. As shipped, the formula steps use CUDA if present, else the CPU. Layout uses the CPU unless the config names a device.
- The LayoutLMv3 layout model, or the newer weight files.
- MinerU on the two-column pages, and the pdf-extract-kit package on PyPI.
Sources
- PDF-Extract-Kit on GitHub, AGPL-3.0
- PDF-Extract-Kit-1.0 weights, license agpl-3.0 in its README
- MinerU on GitHub: enum_class.py in 3.4.5, model/registry.py in 4.0.0
- doclayout-yolo release history
- We make the Apify Actor, not PDF-Extract-Kit or MinerU.
Questions people ask
What is PDF-Extract-Kit?
An AGPL-3.0 toolkit from opendatalab, the team behind MinerU. It finds layout boxes with DocLayout-YOLO, finds and reads formulas, and reads text with PaddleOCR. Its last code commit was on January 3, 2025.
Is PDF-Extract-Kit the same as MinerU?
No. MinerU is the full PDF to Markdown tool. Up to version 3.4.5 it downloaded its pipeline weights from PDF-Extract-Kit's repos. Version 4.0.0 moved to its own weight packs.
Does PDF-Extract-Kit keep the order of two columns?
No. Its Markdown step sorts blocks from top to bottom. On 10 two-column pages, 50.9% of words came out in reading order, but it read 93.2% of them.