Backport blacklist of Ghostscript 9.24

This commit is contained in:
James R. Barlow
2018-09-16 15:06:54 -07:00
parent 6b5934ff4e
commit 8102ca1075
3 changed files with 12 additions and 3 deletions
+8
View File
@@ -863,6 +863,14 @@ def run_pipeline():
"security vulnerabilities with certain malformed PDFs. Consider "
"upgrading to version 7.0.0 or newer.".format(qpdf.version()))
if ghostscript.version() == '9.24':
complain(
"Ghostscript 9.24 contains serious regressions and is not "
"supported. Please upgrade to Ghostscript 9.25 or use an older "
"version."
)
return ExitCode.missing_dependency
# Any changes to options will not take effect for options that are already
# bound to function parameters in the pipeline. (For example
# options.input_file, options.pdf_renderer are already bound.)
+2 -1
View File
@@ -43,7 +43,8 @@ def jpeg_passthrough_available():
https://bugs.ghostscript.com/show_bug.cgi?id=699216
The issue was fixed for 9.24, hence that is the first version we consider
the feature available.
the feature available. (However, we don't use 9.24 at all, so the first
version that allows JPEG passthrough is 9.25.
Regardless, in ocrmypdf 6.x we are ignoring this new feature entirely to
avoid new behavior.
+2 -2
View File
@@ -935,8 +935,8 @@ def generate_postscript_stub(
v.encode('ascii', errors='strict')
except UnicodeEncodeError:
log.warning(
"Ghostscript 9.24 does not support Unicode strings in metadata."
" These will be converted to ASCII if possible."
"Ghostscript 9.24+ does not support Unicode strings in "
" metadata. These will be converted to ASCII if possible."
)
generate_pdfa_ps(output_file, pdfmark, ascii_docinfo=ascii_docinfo)