diff --git a/docs/release_notes.rst b/docs/release_notes.rst index c629ada1..dc7c97b2 100644 --- a/docs/release_notes.rst +++ b/docs/release_notes.rst @@ -13,6 +13,12 @@ Note that it is licensed under GPLv3, so scripts that ``import ocrmypdf`` and ar find: [^`]\#([0-9]{1,3})[^0-9] replace: `#$1 `_ +v7.0.6 +------ + +- Blacklist Ghostscript 9.24, now that 9.25 is available and fixes many regressions in 9.24. + + v7.0.5 ------ diff --git a/src/ocrmypdf/__main__.py b/src/ocrmypdf/__main__.py index e5d68a83..a0453a35 100755 --- a/src/ocrmypdf/__main__.py +++ b/src/ocrmypdf/__main__.py @@ -858,6 +858,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.) diff --git a/src/ocrmypdf/_pipeline.py b/src/ocrmypdf/_pipeline.py index dfc2f5df..1472ba84 100644 --- a/src/ocrmypdf/_pipeline.py +++ b/src/ocrmypdf/_pipeline.py @@ -789,8 +789,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) diff --git a/src/ocrmypdf/exec/ghostscript.py b/src/ocrmypdf/exec/ghostscript.py index 9e721699..701f2548 100644 --- a/src/ocrmypdf/exec/ghostscript.py +++ b/src/ocrmypdf/exec/ghostscript.py @@ -42,7 +42,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. """ return version() >= '9.24'