PDF Craft OCR: three projects, one name, tested
1,939
of 1,955 words, pdf-craft on a Mac
Three projects share the name
| Project | What it is | OCR |
|---|---|---|
| pdf-craft (oomol-lab) | Python library: scanned books to Markdown and EPUB | DeepSeek or Unlimited OCR |
| PdfCraft (storytold) | PDF reader and editor in Rust, with a CLI | Ocrs or Tesseract |
| pdfcraft (PDFCraftTool) | PDF toolkit that runs in the browser | Tesseract.js |
All three are open source. A name this good gets used three times, and three more times on Android.
Licenses, stars and the Android apps
- pdf-craft: MIT, 6,789 GitHub stars. Versions before 1.0 were AGPL-3.0.
- PdfCraft: MIT or Apache-2.0, 21,433 stars.
- PDFCraftTool's pdfcraft: AGPL-3.0, 9,871 stars.
- PdfCraft for Android is on F-Droid (MIT or Apache-2.0). Two Play Store apps use the name, and neither mentions OCR.
- Stars as of November 22, 2026.
Same scan, four OCR runs
My 28-engine test scan: 10 proofread book pages, 1,955 words.
| Way | Words | Seconds |
|---|---|---|
| pdf-craft 2.6.7, DeepSeek-OCR 2 on the Mac GPU | 1,939 | 30.8 |
| PdfCraft 0.21.1, Tesseract engine | 1,880 | 51.3 |
| Tesseract.js 6 with PDFCraftTool's settings | 1,880 | 25.1 |
| PdfCraft 0.21.1, Ocrs engine | 1,822 | 13.5 |
- Ocrs wrote the lone word I 21 times. The true text has 39.
- The PdfCraft Mac CLI download has no OCR models. I took them from its Mac app.
- The three Tesseract and Ocrs runs kept line-end hyphens.
pdf-craft needs CUDA or a server
pdf-craft's local OCR runs only on an NVIDIA GPU. Its other mode sends each page to an OCR server. For DeepSeek OCR, any OpenAI-style server works. On a Mac, llama.cpp's llama-server runs DeepSeek-OCR 2 on the GPU and fills that role.
1,947 words, the server alone
25.2 s for 10 pages, Mac GPU
pdf-craft lost 8 of those words on the way to Markdown, as shown below.
Run it on a Mac: 3 steps
-
brew install poppler, thenpip install pdf-craft==2.6.7(Python 3.11 to 3.13). - Get llama.cpp b12316 and the two q8_0 GGUF files (3.1 GB and 0.5 GB). Start the server:
./llama-b12316/llama-server -m gguf/deepseek-ocr-2-q8_0.gguf --mmproj gguf/mmproj-deepseek-ocr-2-q8_0.gguf \
--special -r "<|end▁of▁sentence|>" --temp 0 --flash-attn off --dry-multiplier 0.8 --dry-base 1.75 --dry-allowed-length 2 \
--dry-sequence-breaker none --threads 2 -np 1 -c 8192 --host 127.0.0.1 --port 8080
- Run this script with
python scan2md.py book.pdf:
import sys
from pathlib import Path
from pdf_craft import ConcurrentExecutor, DeepSeekOCR2VendorConfig, FixedCapacity, PDFCraft, PDFOptions
pdf = Path(sys.argv[1])
ocr = DeepSeekOCR2VendorConfig(base_url="http://127.0.0.1:8080", api_key="local", model="deepseek-ocr-2")
craft = PDFCraft(PDFOptions(ocr=ocr, ocr_executor=ConcurrentExecutor(FixedCapacity(1))))
book = craft.extract_pdf(pdf, pdf.with_suffix(".pcex"))
craft.render_markdown(book, pdf.with_suffix(".md"))
craft.render_epub(book, pdf.with_suffix(".epub"))
Four things broke first
-
With
--chat-template deepseek-ocr, the server answered pdf-craft's request with HTTP 400: the template drops the image marker. -
Without
--special, the box tag markers vanish. pdf-craft reads the page layout from them. -
--specialalso prints DeepSeek's end token. Without-r, it landed in the Markdown 10 times. - The README's quick start stops with "Vendor OCR requires an explicit OCR executor". The script above adds one.
Running heads became chapters
- At all 4 page breaks in the first book, pdf-craft joined two words: Theboat, oncemore.
- DeepSeek marks some running heads as subtitles, and pdf-craft kept 5 as headings. The EPUB's contents list shows THE UNCOMMON PRAYER-BOOK 4 times.
- The EPUB says its language is zh (Chinese) and its title is Unnamed.
- The good part: no page numbers left. DeepSeek dropped all 10 by itself.
Scanned PDFs to text, no GPU
Our pdf-ocr Actor on the Apify Store reads scanned PDFs on a CPU, in 23 languages. On this scan, its removeHeadersFooters option left 1 of 10 running heads and no page numbers.
- Scanned pages: $0.006 each. Digital pages: free. Plus a $0.00005 start fee a run at the default 1 GB.
- On Apify's free plan, it stops at 20 pages a run and 50 a month.
How I tested it
- pdf-craft 2.6.7 (doc-page-extractor 1.2.3) in Python 3.13, with DeepSeekOCR2VendorConfig. Its default 300 dpi page pictures, sent one page at a time by the script's executor.
- Server: llama.cpp b12316 (macOS arm64 build), the q8_0 GGUF and mmproj of sabafallah/DeepSeek-OCR-2-GGUF at commit d08e5af4, the sampling flags of my DeepSeek OCR test. DeepSeek-OCR 2 is Apache-2.0. The GGUF repo states no license.
- "Server alone": the same request pdf-craft sends, one page at a time, box tags cut.
- PdfCraft: pdfcraft-cli 0.21.1 (macOS universal), the ocr_recognize_files tool, language en, then pdftotext on its searchable PDF. Tesseract 5.5.4 from Homebrew.
- PDFCraftTool: its ocr.ts at commit c3a591e copied in Node, not the web app: tesseract.js 6.0.1, eng, pages drawn at 144 dpi (its pdf.js scale 2) with its contrast step.
- Scan: 10 proofread pages of 2 public domain books on English Wikisource. Score: true words found in order. Extra words do not lower a score.
- Running heads and page numbers: the list read off the page images for my PDF to audiobook test. The Actor numbers are from its code at build 0.1.114, Nov 21.
- Seconds: model loaded. PdfCraft and Tesseract.js: the second of two runs. Tesseract.js and the server alone: OCR time per page, added up. Other jobs ran on the Mac, so times vary. macOS 26.6 on an Apple M5 Max, at background priority.
What I did not test
- pdf-craft's local OCR on an NVIDIA GPU, and its online service.
- DeepSeek OCR 1, Unlimited OCR, translation and footnotes.
- The PdfCraft and PDFCraftTool apps by clicking, and the Android apps.
- Tables, formulas, two columns and languages other than English.
Sources
Questions people ask
Is pdf-craft free?
Yes. The pdf-craft library is MIT licensed. Its makers also sell PDF Craft Online: $1 of free credit at sign-up, then about $3 per 1,000 pages for a plain conversion.
Does pdf-craft run on a Mac?
Not with local OCR, which needs an NVIDIA GPU with CUDA. With DeepSeek-OCR 2 in a local llama-server, yes: 10 book pages took 30.8 seconds on an Apple M5 Max.
Is there a pdf-craft Docker image?
Not from oomol-lab. PDFCraftTool's browser toolkit has ghcr.io/pdfcrafttool/pdfcraft, and linuxserver's craft-apps image includes storytold's PdfCraft.