Skip to content

Commit

Permalink
fixes #51
Browse files Browse the repository at this point in the history
Allow tesseract 3.02.01 to be used.
Even 3.02.01 fails in few cases (see issue #28). I decided to allow this
version anyway because 3.02.02 is not yet available for some widespread
linux distributions
  • Loading branch information
fritz-hh committed Jan 25, 2014
1 parent be830dd commit 4cf3840
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion OCRmyPDF.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ cd "`dirname $0`"

# ensure the right tesseract version is installed
# older versions are known to produce malformed hocr output and should not be used
reqtessversion="3.02.02"
# Even 3.02.01 fails in few cases (see issue #28). I decided to allow this version anyway because
# 3.02.02 is not yet available for some widespread linux distributions
reqtessversion="3.02.01"
tessversion=`tesseract -v 2>&1 | grep "tesseract" | sed s/[^0-9.]//g`
tesstooold=$(echo "`echo $tessversion | sed s/[.]//2`-`echo $reqtessversion | sed s/[.]//2` < 0" | bc)
[ "$tesstooold" -eq "1" ] \
Expand Down

0 comments on commit 4cf3840

Please sign in to comment.