From 4cf38404ccc34e4d01dece0c228e5bb92d9273c9 Mon Sep 17 00:00:00 2001 From: fritz-hh Date: Sat, 25 Jan 2014 21:58:50 +0100 Subject: [PATCH] fixes #51 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 --- OCRmyPDF.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OCRmyPDF.sh b/OCRmyPDF.sh index 7a917fa4..d72cc3fc 100644 --- a/OCRmyPDF.sh +++ b/OCRmyPDF.sh @@ -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" ] \