Mayan EDMS OCR, tested on a 10-page scan
96.1%
of words found, in 10.4 seconds
1,878 of 1,955 words, app on 2 CPUs
| Run | Words found | Seconds |
|---|---|---|
| Mayan, fresh stack | 1,878 | 10.4 |
| Mayan, same file again | 1,878 | 7.4 |
| Mayan, typed cover page first | 1,879 | 9.1 |
| Our Actor's code, on our Mac | 1,879 | 47.8 |
Mayan runs Tesseract 5.5.0 with eng. Its seconds run from upload to the last page with text. The Actor row adds up its page times.
It starts with 3 lines
curl -O https://gitlab.com/mayan-edms/mayan-edms/-/raw/master/docker/docker-compose.yml
curl -O https://gitlab.com/mayan-edms/mayan-edms/-/raw/master/docker/.env
docker compose up -d
- Four arm64 containers (app, PostgreSQL, RabbitMQ, Redis), so no emulation on a Mac.
- With the images already downloaded, it answered in 23.7 seconds. The first login page shows an admin password.
-
The file serves port 80 to your whole network and lets the app
container use 6 CPUs. We set
MAYAN_FRONTEND_HTTP_PORT=127.0.0.1:18080andMAYAN_DOCKER_CPU_LIMIT=2.0.
It reads every page, even typed ones
Mayan ran OCR on a typed cover page too, and kept its 13 words twice: in the OCR text and the parsed text.
With its default settings, Paperless-ngx 3.4.2 stored only those cover words for the same file.
Searching "Hatton", "tommyrot" or "herring" found all 3 uploads of the scan in 0.59 seconds or less.
No searchable PDF comes back
The download is your upload, byte for byte, and the PDF export has no text. This loop gets it out:
MAYAN=http://localhost
PASSWORD='from the login page'
TOKEN=$(jq -n --arg p "$PASSWORD" '{username: "admin", password: $p}' \
| curl -s -H "Accept: application/json" -H "Content-Type: application/json" -d @- \
"$MAYAN/api/v4/auth/token/obtain/" | jq -r .token)
AUTH="Authorization: Token $TOKEN"
DOC=1
VER=$(curl -s -H "$AUTH" "$MAYAN/api/v4/documents/$DOC/" | jq .version_active.id)
curl -s -H "$AUTH" "$MAYAN/api/v4/documents/$DOC/versions/$VER/pages/?page_size=100" \
| jq '.results[].id' | while read -r P; do
curl -s -H "$AUTH" "$MAYAN/api/v4/documents/$DOC/versions/$VER/pages/$P/ocr/" | jq -r .content
done > doc.txt
Keep the Accept line; without it the token path answers with a web
page. Over 100 pages? Rerun with &page=2 into a new
file.
Only English is installed
The image has only eng and osd. A document set to German (deu) got no text in 180 seconds. Mayan saved this error in each page's error log, and the app log had it too:
The requested OCR language "deu" is not available and needs to be installed.
The fix, in the compose folder:
echo "MAYAN_APT_INSTALLS=tesseract-ocr-deu" >> .env-local
docker compose up -d
The app installed the pack at start and answered in 18.1 seconds. A new upload set to deu got text on 10 of 10 pages. Failed documents stay empty until sent again:
DOC=4
curl -X POST -w "%{http_code}\n" -H "$AUTH" \
"$MAYAN/api/v4/documents/$DOC/ocr/submit/"
The app holds 3.84 GiB at rest
- At rest
- 3.84 GiB
- 60 seconds after the last job
- During OCR
- 4.17 GiB
- at most
- Images
- 3.69 GB
- 4 images
Mayan EDMS vs Paperless-ngx and others
| Tool | Words found | Seconds |
|---|---|---|
| Mayan EDMS 4.12.2 | 1,878 | 10.4 |
| Paperless-ngx 3.4.2 | 1,874 | 40.7 |
| Docspell 0.43.0 | 1,881 | 50.1 |
| Papermerge 3.5.3 | 1,879 stored (1,864 in its PDF) | 48.3 |
Same 10 pages, our Mac, different days. The other three also run OCRmyPDF and write a searchable PDF in that time. Docspell and Papermerge ran in amd64 emulation, and each tool times its seconds differently, so they are not a fair race.
Only need the text? Try our Actor
Our Apify Actor turns scanned PDFs into Markdown, with no server. On these pages it found 1,879 words, one more than Mayan, but it took 47.8 seconds on our Mac.
The free plan takes 20 pages a run, 50 a month. A scanned page costs $0.006, and pages with a text layer are free.
How I tested it
- 10 proofread book pages from English Wikisource, as one scanned PDF with no text layer. The cover file is a typed 13-word page plus the same pages.
- The project's docker-compose.yml and .env from the GitLab master branch, unchanged. Docker Desktop 4.94.0 (Docker Engine 29.8.2) on Apple silicon. We set the port, a 2 CPU cap and a 1 CPU reservation on the app container (the file caps only the app).
- Mayan EDMS 4.12.2 (image s4.12, built September 16, 2026), Tesseract 5.5.0, Django 5.2.17, Celery 5.6.3. No OCRmyPDF in the image.
- Upload by POST /api/v4/documents/upload/. Its own help says it goes away in 5.0, but the newer sources endpoint answered 400 to the same fields.
- Score: true words found in order. Memory from docker stats every 2 seconds. Our Actor's code at commit 5c8f91b0 (build 0.1.100), language eng, one page at a time.
- Mayan EDMS is GPL-2.0, and its name and logo are its owner's trademarks. We ran the images and ship none of its code.
What I did not test
GPUs, documents over 100 pages, non-Latin scripts, Elasticsearch search, the multi-container setup, staging and watch folders, email sources, handwriting, photos, a German score, and Windows or Linux hosts.
Questions people ask
Does Mayan EDMS do OCR?
Yes. It ran Tesseract on every page of our scan by itself and found 1,878 of 1,955 words in 10.4 seconds, the app capped at 2 CPUs.
Does Mayan EDMS make a searchable PDF?
No. The download is the file you uploaded, and the PDF export has no text. The OCR text is in its search and its API.
How do I add an OCR language to Mayan EDMS?
Add MAYAN_APT_INSTALLS with the Debian pack, for example tesseract-ocr-deu, to .env-local and run docker compose up -d. Then send documents that failed to OCR again.
Mayan EDMS or Paperless-ngx?
On our 10 pages they found about the same words, 1,878 and 1,874. Paperless-ngx writes a searchable PDF. On a file with a typed cover page, Mayan read all 11 pages, and Paperless-ngx by default kept only the 13 cover words.