From 7394a4cf49f91ee2d5a84a87fcf33bf8adaf049f Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Fri, 11 May 2018 02:31:07 -0700 Subject: [PATCH] Cherrypick warning about --user-words not having any effect Might be available in full release of Tess4 --- src/ocrmypdf/__main__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ocrmypdf/__main__.py b/src/ocrmypdf/__main__.py index 9290daf2..5510578c 100755 --- a/src/ocrmypdf/__main__.py +++ b/src/ocrmypdf/__main__.py @@ -490,6 +490,10 @@ def check_options_advanced(options, log): "--pdfa-image-compression argument has no effect when " "--output-type is not 'pdfa', 'pdfa-1', or 'pdfa-2'" ) + + if tesseract.v4() and (options.user_words or options.user_patterns): + log.warning( + 'Tesseract 4.x ignores --user-words, so this has no effect') def check_options_metadata(options, log):