tesseract and php exec

138 views
Skip to first unread message

peiman F.

unread,
Jan 31, 2014, 10:20:50 AM1/31/14
to tesser...@googlegroups.com
hello all
i have to run tesseract in php project with exec command
but the exec will crash on start of tesseract working

my code is something like this

        foreach($files as $key=>$fil){
                       
exec("tesseract $fil $html -l eng -psm 6  hocr > /home/t/$key.txt ");
       
}
print('1000');

but this code crash the exec and script dont continue hish job
and thats amazing the tesseract will work and ocr all pages!!!

peiman F.

unread,
Jan 31, 2014, 10:22:36 AM1/31/14
to tesser...@googlegroups.com
complete post:
-----------------------------
in this example the script will ocr all pages but dont go to print('1000'); line!!

any body know how can fix this?!

Donald Winston

unread,
May 1, 2014, 9:59:50 AM5/1/14
to tesser...@googlegroups.com
Remove the ">" just specify the filename for the output. Use > for errors e.g., 2> /home/t/$key.err

universal reseller

unread,
May 2, 2014, 4:53:34 PM5/2/14
to tesser...@googlegroups.com
because its for errors
​ ​
...​
the tesseract output will save at $fil
and i have to log the errors with
​  
​  ​
> /home/t/$key.txt
Reply all
Reply to author
Forward
0 new messages