Complain if Chinese is requested with settings known to not work

Should extend test for other Asian languages
This commit is contained in:
James R. Barlow
2016-08-03 01:29:12 -07:00
parent d32ea8d0dd
commit 35addb8a33
+7
View File
@@ -282,6 +282,13 @@ if options.clean and not options.clean_final \
"Tesseract PDF renderer cannot render --clean pages without "
"also performing --clean-final, so --clean-final is assumed.")
if set(options.language) & {'chi_sim', 'chi_tra'} \
and (options.pdf_renderer == 'hocr' or options.output_type == 'pdfa'):
complain(
"Your settings are known to cause problems with OCR of Chinese text. "
"Try adding these arguments: "
" ocrmypdf --pdf-renderer tesseract --output-type pdf")
lossless_reconstruction = False
if options.pdf_renderer == 'hocr':
if not options.deskew and not options.clean_final and not options.force_ocr: