Complain about older tesseracts that don't have sharp2.ttf installed

This commit is contained in:
James R. Barlow
2016-02-15 16:43:41 -08:00
parent a62f86dbd7
commit c50e3f1329
+7 -1
View File
@@ -60,7 +60,6 @@ if tesseract.version() < MINIMUM_TESS_VERSION:
MINIMUM_TESS_VERSION, tesseract.version()))
sys.exit(ExitCode.missing_dependency)
try:
import PIL.features
check_codec = PIL.features.check_codec
@@ -228,6 +227,12 @@ if not set(options.language).issubset(tesseract.languages()):
if options.pdf_renderer == 'auto':
options.pdf_renderer = 'hocr'
if options.pdf_renderer == 'tesseract' and tesseract.version() < '3.04.01':
complain(
"WARNING: Your version of tesseract has problems with PDF output. "
"Some PDF viewers will fail to find searchable text. "
"--pdf-renderer=tesseract is not recommended.")
if any((options.deskew, options.clean, options.clean_final)):
try:
from . import unpaper
@@ -259,6 +264,7 @@ if options.pdf_renderer == 'hocr':
if not options.deskew and not options.clean_final and not options.force_ocr:
lossless_reconstruction = True
# ----------
# Logging