From 1b01d45dd246e90b0252b692fe84a33ad42e6816 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Mon, 2 Apr 2018 19:29:17 -0700 Subject: [PATCH] Warn about Python 3.5 page count issue --- src/ocrmypdf/pipeline.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ocrmypdf/pipeline.py b/src/ocrmypdf/pipeline.py index 11459f21..cfa94e98 100644 --- a/src/ocrmypdf/pipeline.py +++ b/src/ocrmypdf/pipeline.py @@ -231,6 +231,12 @@ def repair_and_parse_pdf( "output these files.) Use --output-type=pdf instead." ) raise InputFileError() + + if len(pdfinfo.pages) > 2000 and sys.version_info[0:2] <= (3, 5): + log.warning( + "Performance regressions are known occur with Python 3.5 for " + "high page count files. Python 3.6 or newer is recommended." + ) context.set_pdfinfo(pdfinfo) log.debug(pdfinfo)