The goal is to automatically convert all scanned documents into searchable PDF files instead of just images. The scanned documents are automatically uploaded by the scanner to a share on a Linux server as PDF files.

The software should be able to monitor the folder and automatically OCR the scanned documents and add the recognized text to the PDF file to make it searchable. It should also be able to handle multi-page PDFs well.


  • Linux
  • Work automatically in the background without any additional manual steps
  • Being able to add the OCRed text back into the PDF in the proper way (so that desktop search engines will be able to index it)
  • Able to handle multi-page PDF files
  • I guess Adobe Acrobat/Omnipage + Wine or some VM is not an option? – Franck Dernoncourt Apr 28 '14 at 14:27
  • Do you need real-time monitoring or is just checking every X amount of time acceptable? – Nick Dickinson-Wilde Apr 28 '14 at 14:42
  • 1
    @NickWilde Doesn't need to be absolutely real-time, if I can call it from a cron job that would be sufficient – user15 Apr 28 '14 at 14:43
  • Also I'd recommend not overwriting the originals - if the OCR messes up it is better to have them; would renaming the original to %name%.bck.pdf or similar be okay for your users? – Nick Dickinson-Wilde Apr 28 '14 at 14:44
  • I use Microsoft OneNote as OCR tool. On Right click against an image It can copy the entire text in images and It also has the capability to search text with in image. It is free and accurate and runs on windows and support almost all image formats. I am not sure if it works in Ubuntu or not through Wine, as Microsoft Office is now available for Mac OS, OneNote will work on it. But it doesn't do it automatically you have to add file into OneNote workbook. It Searches multi page PDF's. Bonus point is that it supports multiple languages :) English, French, Spanish also – BarathVutukuri Jul 23 '15 at 11:29

Website: https://github.com/jbarlow83/OCRmyPDF
License: MIT License

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


Website: https://pypi.python.org/pypi/pypdfocr
License: ASL 2.0

I wrote a pretty simple way to search all pdfs that are not already OCRed and OCR them.

I noticed if a pdf file doesn't have any font it is usually not searchable. So knowing this we can use pdffonts.

First 2 lines of the pdffonts are the table header, so when a file is searchable has more than two line output, knowing this we can create:

gedit check_pdf_searchable.sh

then paste this

#set -vx
if ((`pdffonts "$1" | wc -l` < 3 )); then
echo $1
pypdfocr "$1"

then make it executable

chmod +x check_pdf_searchable.sh

then list all non-searchable pdfs in the directory:

ls -1 ./*.pdf | xargs -L1 -I {} ./check_pdf_searchable.sh {}

or in the directory and its subdirectories:

tree -fai . | grep -P ".pdf$" | xargs -L1 -I {} ./check_pdf_searchable.sh {}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy