diff --git a/src/ocrmypdf/builtin_plugins/ghostscript.py b/src/ocrmypdf/builtin_plugins/ghostscript.py index 110e6983..46b5e331 100644 --- a/src/ocrmypdf/builtin_plugins/ghostscript.py +++ b/src/ocrmypdf/builtin_plugins/ghostscript.py @@ -131,10 +131,10 @@ def check_options(options): ) if gs_version >= Version('10.6.0'): log.warning( - "Ghostscript 10.6.x contains JPEG encoding errors that may corrupt " - "images. OCRmyPDF will attempt to mitigate, but this version is " - "strongly not recommended. Please upgrade to a newer version. " - "As of 2025-12, 10.6.0 is the latest version of Ghostscript." + "Ghostscript %s contains JPEG encoding errors that may corrupt " + "images. OCRmyPDF will attempt to mitigate, but versions 10.6.0+ " + "are strongly not recommended until this is fixed upstream.", + gs_version, ) if options.output_type == 'pdfa': options.output_type = 'pdfa-2' diff --git a/tests/conftest.py b/tests/conftest.py index 472aaee0..f3abe5d3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -19,14 +19,11 @@ from ocrmypdf.exceptions import ExitCode class Gs106WarningFilter(logging.Filter): - """Filter out expected Ghostscript 10.6.x warning from test logs.""" + """Filter out expected Ghostscript 10.6+ JPEG encoding warning from test logs.""" def filter(self, record: logging.LogRecord) -> bool: - # Allow all records except the expected Ghostscript 10.6.x warning - return ( - "Ghostscript 10.6.x contains JPEG encoding errors" - not in record.getMessage() - ) + # Allow all records except the expected Ghostscript 10.6+ warning + return "contains JPEG encoding errors" not in record.getMessage() @pytest.fixture(autouse=True)