Tools,

Open WebUI OCR, tested on a scanned PDF

0 of 1,955

words Open WebUI found by default

Get the one-setting fix

Turn on PDF image OCR

One setting fixed my 10-page scan:

1,902 of 1,955 true words found

29.7 seconds for 10 pages

With no settings, Open WebUI 0.13.3 said HTTP 200 for the upload, then processing failed:

The content provided is empty. Please ensure that there is text or data present before proceeding.

The default loader reads only a text layer. Start it with this:

docker run -d --name open-webui -p 127.0.0.1:3000:8080 \
  -e PDF_EXTRACT_IMAGES=True \
  -v open-webui:/app/backend/data \
  ghcr.io/open-webui/open-webui:main

The OCR is RapidOCR 3.10.0, already in the image. No second server.

A second start ignores new env

Open WebUI saves its settings in the volume on the first start. I started a used volume again with CONTENT_EXTRACTION_ENGINE=tika. Its config still said the default engine, and the scan still came back empty.

Two fixes worked:

Set the Tika server version to 4

The Tika image in the Open WebUI docs, apache/tika:latest-full, is Tika 4.2.0 now. Open WebUI expects Tika 3 unless told. The upload failed with:

Extra data: line 1 column 4 (char 3)

Put both on one Docker network:

docker network create owui
docker run -d --name tika --network owui apache/tika:latest-full

Then start Open WebUI with the version set:

docker run -d --name open-webui --network owui -p 127.0.0.1:3000:8080 \
  -e CONTENT_EXTRACTION_ENGINE=tika \
  -e TIKA_SERVER_URL=http://tika:9998 \
  -e TIKA_SERVER_VERSION=4 \
  -v open-webui:/app/backend/data \
  ghcr.io/open-webui/open-webui:main

It found 1,870 words in 9.7 seconds. Tika is 2.01 GB more disk.

The plain Tika image finds nothing

With apache/tika:latest, which has no Tesseract, the upload said completed, with no error. The file text was:

<No text content found>

That is 0 words that look like success. Use the -full image.

Seven setups, one scan

10 scanned pages, 1,955 true words
Setup Words found Seconds
No settings 0 1.1
Image OCR switch on 1,902 29.7
Tika 4, version not set 0 9.9
Tika 4, version set to 4 1,870 9.7
apache/tika:latest 0 1.1
New env on a used volume 0 1.1
Our OCR Actor, then upload 1,874 151.5

Open WebUI and Tika ran in Docker on a Mac, each limited to 2 CPUs. The Actor's time includes its start in the cloud.

Cannot change the server? Upload Markdown

On a shared Open WebUI, you may not get to set any of this. Our OCR Actor takes a PDF URL and returns Markdown:

curl -s -X POST "https://api.apify.com/v2/acts/brasspage~pdf-ocr-to-markdown/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"documentUrls": ["https://api.apify.com/v2/key-value-stores/sTnmNrGoSsi7tLQvs/records/langchain-scan-10-pages.pdf"]}' \
  | jq -r '.[].markdown' > scan.md

Then upload scan.md with your Open WebUI token:

curl -s -H "Authorization: Bearer $OWUI_KEY" -F file=@scan.md http://localhost:3000/api/v1/files/

Open WebUI kept all 1,874 words. On this scan the free switch above found more. The Actor costs $0.006 a page.

How I tested it
  • Scan: the 10-page PDF of OCR in n8n, the first 10 of 55 proofread Wikisource book scans, with no text layer. 1,955 true words.
  • Score: true words found in order, with the scorer of the tessdata test.
  • ghcr.io/open-webui/open-webui:main, version 0.13.3 (5.83 GB on disk), a fresh volume for each setup. Tika 4.2.0 with Tesseract 5.5.0. The bench script used the upload and config APIs.
  • The code blocks above are the files that ran. The Actor: one real run on the 10-page PDF.
What I did not test
  • Docling, Mistral OCR, Document Intelligence, and the other engines.
  • The slim image, Ollama, and the answers a model gives.
  • Tables, photos, handwriting, and other languages.
Sources

Two ways to skip the work

Run it yourself. Our Apify Actor turns scanned PDFs into Markdown, tables included.

Try the Actor

Or send us the scan. Tack, our AI, does the job for $29, up to 50 pages. First page free.

Get one page free

Questions people ask

Why does Open WebUI say the content provided is empty?

The PDF is a scan, and the default loader reads only a text layer. With PDF_EXTRACT_IMAGES=True, my 10-page scan gave 1,902 of 1,955 words.

Why does Open WebUI fail with Apache Tika?

apache/tika:latest-full is Tika 4.2.0 now, and Open WebUI 0.13.3 expects Tika 3 by default. Set TIKA_SERVER_VERSION=4. It then found 1,870 words.

Why does Open WebUI ignore my environment variables?

It saves its settings in the volume on the first start and reads them from there after. Set ENABLE_PERSISTENT_CONFIG=False, or change the setting in the admin settings.