Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want tesseract to convert all the files of a folder. I do not want to merge the files in any way as I am having trouble with programs like hocr2pdf and pdfbeads merging more than one file at a time.

I run tesseract *.tif * hocr and end up with the following

read_params_file: parameter not found: II*

share|improve this question
    
If you have multiple tif files in a directory (lets say example1.tif, example2.tif, and example3.tif then your command gets expandeded by the shell to tesseract example1.tif example2.tif example3.tif hocr. This is done before tesseract gets to see any parameters. –  Hennes Mar 30 '13 at 12:30

1 Answer 1

up vote 3 down vote accepted

I tried this and it works

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

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

share|improve this answer
    
I actually wanted split html files that command just replaces the last page converted, wildcarding outtext doesn't work –  user140393 Mar 30 '13 at 12:26
    
Then add $i on end of outtext and they would be seperate files ie outtext$i –  Meer Borg Mar 30 '13 at 12:33
    
Many Thanks. for i in *.tif ; do tesseract $i $i hocr; done; was just what I was looking for :D –  user140393 Mar 30 '13 at 13:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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