OCRmyPDF: Add an OCR text layer to scanned PDF file

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Judoscale - Save 47% on cloud hosting with autoscaling that just works
Judoscale integrates with Django, FastAPI, Celery, and RQ to make autoscaling easy and reliable. Save big, and say goodbye to request timeouts and backed-up task queues.
judoscale.com
featured
InfluxDB high-performance time series database
Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems.
influxdata.com
featured
  1. doctr

    docTR (Document Text Recognition) - a seamless, high-performing & accessible library for OCR-related tasks powered by Deep Learning.

    If you want to OCR a document image, modern versions of Tesseract can work well. If you last used it a few years ago, the recognition has improved since due to a new text recognition algorithm that uses modern (deep learning) techniques. Browser demo using a modern version: https://robertknight.github.io/tesseract-wasm/.

    OCR processing typically consist of two major steps: detecting/locating words or lines of text on the page, and recognizing lines of text.

    Tesseract's text recognition uses modern methods, but the text detection phase is still based on classical methods involving a lot of heuristics, and you may need to experiment with various configuration variables to get the best results. As a result it can fail to detect text if you present it with something other than a reasonably clean document image.

    Doctr (https://github.com/mindee/doctr) is a new package that uses modern methods for both text detection and recognition. It is pretty new however and I expect will take more time and effort to mature.

  2. Judoscale

    Save 47% on cloud hosting with autoscaling that just works. Judoscale integrates with Django, FastAPI, Celery, and RQ to make autoscaling easy and reliable. Save big, and say goodbye to request timeouts and backed-up task queues.

    Judoscale logo
  3. OCRmyPDF

    OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched

  4. naps2

    Scan documents to PDF and more, as simply as possible.

  5. pdfarranger

    Small python-gtk application, which helps the user to merge or split PDF documents and rotate, crop and rearrange their pages using an interactive and intuitive graphical interface.

    http://www.tobias-elze.de/pdfsandwich/ has been my tool for years to OCR old research papers and books. It uses Tesseract and some other tools to get the job done.

    It's last in my workflow after using:

    Briss, a simple cross-platform application for cropping PDF files: https://sourceforge.net/projects/briss/

    PDF Arranger to merge or split pdf documents and rotate, crop and rearrange their pages using an interactive and intuitive graphical interface: https://github.com/pdfarranger/pdfarranger

  6. scantailor-universal

    ScanTailor Universal - a fork based on Enhanced+Featured+Master versions of ST

    I use OCRmyPDF on a regular basis to OCR journal articles my library sends me.

    I've found it works great on English but (with appropriate language packs installed) works poorly on Greek and Hebrew. It also makes no effort to understand the layout of pages (e.g., tables).

    The project is fantastic, though. I've often considered building a web frontend that cleans up PDFs and then OCRs them using OCRmyPDF.

    For cleaning, check out https://scantailor.org/

  7. OCRmyPDF

    OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched (by ualiawan)

    As mentioned in the other replies, Google's OCR is limited. OCRmyPDF is designed for PDFs. So if you download a 1000+ page public-domain dictionary off of Archive.org (which is something I do regularly), and you want to re-run the OCR because Internet Archive doesn't tune its OCR very well for multilingual works (if it all), then OCRmyPDF is going to beat Google's automatic OCR every time.

    However, I recently paid a programmer to fork OCRmyPDF to give it the option to use Google's OCR engine instead of Tesseract. That fork is here: https://github.com/ualiawan/OCRmyPDF. It's more fiddly than the regular OCRmyPDF, and it requires a Google Cloud Vision account (which charges some fraction of a cent for each page OCRed), but it works well, and in some cases may produce better results than OCRmyPDF, although you must be sure to specify the language of the document.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Ask HN: What is the best method for turning a scanned book as a PDF into text?

    13 projects | news.ycombinator.com | 16 Feb 2025
  • Llama-OCR: An Open-Source Llama 3.2 Based OCR Tool

    6 projects | news.ycombinator.com | 15 Nov 2024
  • A return to hand-written notes by learning to read and write

    2 projects | news.ycombinator.com | 28 Oct 2024
  • A better document viewer

    1 project | /r/linux4noobs | 13 Sep 2023
  • OCR for a full pdf on Neoreader

    1 project | /r/Onyx_Boox | 25 Jun 2023