diff --git a/src/ocrmypdf/builtin_plugins/tesseract_ocr.py b/src/ocrmypdf/builtin_plugins/tesseract_ocr.py index 9a8a4e79..a7b5c9d5 100644 --- a/src/ocrmypdf/builtin_plugins/tesseract_ocr.py +++ b/src/ocrmypdf/builtin_plugins/tesseract_ocr.py @@ -146,7 +146,11 @@ def check_options(options): # Decide on what renderer to use if options.pdf_renderer == 'auto': - options.pdf_renderer = 'sandwich' + if {'ara', 'heb', 'fas', 'per'} & set(options.languages): + log.info("Using sandwich renderer since there is an RTL language") + options.pdf_renderer = 'sandwich' + else: + options.pdf_renderer = 'hocr' if not tesseract.has_thresholding() and options.tesseract_thresholding != 0: log.warning(