BentoPDF OCR, tested in Docker
1,878
of 1,955 words, same as desktop Tesseract
As many words as Tesseract
BentoPDF runs Tesseract in the browser tab, through tesseract.js. On a 10-page scanned book, it matched the desktop tools:
| Way | Found | 10 pages |
|---|---|---|
| BentoPDF, text box | 1,878 | 54 s |
| BentoPDF, the PDF's text | 1,872 | same run |
| Tesseract 5.5.4, command line | 1,878 | 36 s |
| OCRmyPDF 17.13.0 | 1,874 | 26 s |
| Our Actor's code | 1,880 | 58 s |
Times are rough: one run each, at low priority, with other jobs on the Mac. BentoPDF's times include downloading the engine and model.
Run it in one line
docker run -d --rm --name bentopdf -p 127.0.0.1:3077:8080 \
ghcr.io/alam00000/bentopdf-simple:v2.8.12
- Open
http://127.0.0.1:3077/ocr-pdf. - Pick the PDF, then tick a language from the list of 102. Start OCR stays off until you do.
- Click Start OCR.
- Download the searchable PDF, or the text as a .txt file.
The -simple image is the self-hosting build: every tool, without the marketing sections. It has arm64 and amd64 builds and took 746 MB on our Mac.
The DPI labels are a third high
The labels count 96 pixels an inch. pdf.js, which draws the page for OCR, counts 72. So "288 DPI" draws at 216.
| Label | Real DPI | Words found |
|---|---|---|
| Standard (192 DPI) | 144 | 1,884 |
| High (288 DPI), default | 216 | 1,878 |
| Ultra (384 DPI) | 288 | 1,879 |
On this 300 dpi scan, more resolution found no more words. Standard took 43 s, Ultra 70 s.
Binarize lost words on a clean scan
Its binarize box says "Enhance Contrast for Clean Scans". It turns each pixel black or white at a fixed middle gray.
1,812 words in the text box, from 1,878
1,771 in the PDF's text, from 1,872
Leave it off for clean scans. For faded pages, see what preprocessing helps.
Your PDF stays put, the engine downloads
The upload box says "Your files never leave your device." I logged every request from a fresh browser. None carried the PDF. The tab did fetch 4 files from public CDNs:
- the tesseract.js 7.0.0 worker and its WebAssembly core
- the English model, 4.0.0_best_int
- the Noto Sans font for the text layer
The engine and the model come from cdn.jsdelivr.net, the font from rawcdn.githack.com. Self-hosting the app does not self-host these.
No internet, no OCR
I blocked every request that left 127.0.0.1. OCR stopped in under a second:
OCR Error
An error occurred during the OCR process. The worker may have failed to load. Please try again.
The README's fix: build the image with the
VITE_TESSERACT_* and
VITE_OCR_FONT_BASE_URL settings, or run
scripts/prepare-airgap.sh. I did not test that build.
What the PDF you download holds
- The 10 scan images, byte for byte the same.
- Each word in Noto Sans, hidden with 0% fill opacity. OCRmyPDF uses the invisible text mode instead.
- A file 3% bigger than the scan: 6.70 MB from 6.49 MB.
Want Markdown out? Use the Actor
BentoPDF's OCR page takes one PDF at a time in a browser tab, and gives a searchable PDF and plain text. Our OCR Actor takes a URL or an API call, and gives Markdown.
Pages with their own text are free. A scanned page costs $0.006, and each run has a $0.00005 start fee at the default 1 GB.
How I tested it
- Scan: the 10-page PDF of OCR in n8n, proofread Wikisource book pages as 300 dpi JPEGs with no text layer. 1,955 true words.
- BentoPDF 2.8.12, the arm64 image, on 127.0.0.1. A script clicked through the OCR page in headless Chromium: a new browser each run, English only.
- Score: true words found in order, with the scorer of the tessdata test. The PDF's text: pdftotext -raw.
- Tesseract 5.5.4 from Homebrew, English model tessdata_fast, on the 10 JPEGs. OCRmyPDF with --output-type pdf and 2 jobs.
- Our Actor's code at commit afb0b9f8, its default settings, run on the same Mac. No Apify run.
What I did not test
- Other languages, the whitelist presets, full fonts.
- Faded, tilted or photographed pages.
- bentopdf.com itself, and the OCR node of the Workflow builder.
Sources
Two ways to skip the work
Run it yourself. Our Apify Actor turns scanned PDFs into Markdown, tables included.
Or send us the scan. Tack, our AI, does the job for $29, up to 50 pages. First page free.
Questions people ask
Does BentoPDF OCR upload my PDF?
No. In our test, no request carried the PDF. The browser did fetch the OCR engine, the English model and a font from public CDNs.
Does BentoPDF OCR work offline in Docker?
Not with the default image. With the internet blocked, OCR stopped with a worker error. The README says to build with the VITE_TESSERACT_* and VITE_OCR_FONT_BASE_URL URLs, or to run scripts/prepare-airgap.sh.
Which BentoPDF OCR settings work best?
On a clean 300 dpi scan, Standard found as many words as High and Ultra, in less time. Binarize lost words. High is the default.