I am trying to OCR a book using tesseract however I do not want to type each individual page as it is a book near 1000 pages. How would I accomplish this

I tried tesseract *.tif * which gives me this read_params_file: parameter not found: II*


To avoid overwriting the output file for every new page, I did:

for i in *tif; do b=`basename "$i" .tif`; tesseract "$i" "$b" hocr; done 

It worked fine.

(I found this solution here.)


I tried this and it works

for i in *.tif ; do tesseract $i outtext;  done;

Make sure when you are in terminal you change directory to the location of all of the tif files.

  • doesn't work does the same as <code>tesseract input output</code> I tried replacing outtext as * but that doesn't work either. Just renders that error – user140393 Mar 26 '13 at 11:22
  • Then reinstall tesseract as it worked for me unless you are using a really old version. – Meer Borg Mar 26 '13 at 21:30
  • I reformatted my linux OS and did an install of ubuntu. Grabbed synaptic package manager, then did a sudo apt-get update && sudo apt-get upgrade. Then rebooted. Then wen't on to install tesseract-ocr in synaptic. Works, but keeps overwriting the file for every new page. – user140393 Mar 27 '13 at 5:48
  • I'm running 12.10 64bit, what version are you running? – Meer Borg Mar 27 '13 at 5:54
  • Does it even give you an error if you do it on one file? If so upload file and I can try to see if its the file thats causing the issue – Meer Borg Mar 27 '13 at 5:56

You can use VietOCR, which uses Tesseract and supports batch/bulk OCR.


I wanted convert Kannada (Indian language) as searchable pdf

I modified this for i in *tif; do b=basename "$i" .tif; tesseract "$i" "$b" hocr; done


for i in *tif; do b=basename "$i" .tif; tesseract -l kan "$i" "$b" pdf; done

It worked well for the entire folder was converted from image to searchable pdf Tnakyou

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.