diff --git a/ocrmypdf/exec/ghostscript.py b/ocrmypdf/exec/ghostscript.py index dca504d8..c022c4f3 100644 --- a/ocrmypdf/exec/ghostscript.py +++ b/ocrmypdf/exec/ghostscript.py @@ -81,7 +81,7 @@ def generate_pdfa(pdf_pages, output_file, log, threads=1): universal_newlines=True) stdout, _ = p.communicate() - if 'error' in stdout: + if 'error' in stdout or 'ERROR' in stdout: log.error(stdout) elif 'overprint mode not set' in stdout: # Unless someone is going to print PDF/A documents on a diff --git a/ocrmypdf/exec/tesseract.py b/ocrmypdf/exec/tesseract.py index 3debdc83..30ce5b92 100644 --- a/ocrmypdf/exec/tesseract.py +++ b/ocrmypdf/exec/tesseract.py @@ -186,6 +186,8 @@ def tesseract_log_output(log, stdout, input_file): log.warning(prefix + "unsure about page orientation") elif 'error' in line.lower() or 'exception' in line.lower(): log.error(prefix + line.strip()) + elif 'warning' in line.lower(): + log.warning(prefix + line.strip()) elif 'read_params_file' in line.lower(): log.error(prefix + line.strip()) else: