Warn about Python 3.5 page count issue

This commit is contained in:
James R. Barlow
2018-04-02 19:29:17 -07:00
parent 7a1cd39b21
commit 1b01d45dd2
+6
View File
@@ -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)