From 2f72f8e94a0651f47d6b5b64184c180073e12f95 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Mon, 10 Nov 2025 15:58:14 -0800 Subject: [PATCH] ghostscript: Disable subset fonts For at least the PDF associated with this issue, disabling subset fonts prevents Ghostscript from mangling the encoding when it is usable but not well-formed. Fixes #1592 --- src/ocrmypdf/_exec/ghostscript.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ocrmypdf/_exec/ghostscript.py b/src/ocrmypdf/_exec/ghostscript.py index bd8bd105..35e058e2 100644 --- a/src/ocrmypdf/_exec/ghostscript.py +++ b/src/ocrmypdf/_exec/ghostscript.py @@ -286,6 +286,7 @@ def generate_pdfa( + compression_args + [ "-dJPEGQ=95", + "-dSubsetFonts=false", # Prevents GS from messing up some encodings f"-dPDFA={pdfa_part}", "-dPDFACompatibilityPolicy=1", "-o",