11diff --git a/src/ocrmypdf/_exec/ghostscript.py b/src/ocrmypdf/_exec/ghostscript.py
2- index 94eec244..4bb15db9 100644
2+ index eaa48117..30201d97 100644
33--- a/src/ocrmypdf/_exec/ghostscript.py
44+++ b/src/ocrmypdf/_exec/ghostscript.py
55@@ -31,7 +31,7 @@ COLOR_CONVERSION_STRATEGIES = frozenset(
@@ -12,19 +12,19 @@ index 94eec244..4bb15db9 100644
1212
1313 log = logging.getLogger(__name__)
1414diff --git a/src/ocrmypdf/_exec/jbig2enc.py b/src/ocrmypdf/_exec/jbig2enc.py
15- index 5a34a95a..5ee1b333 100644
15+ index 1c6dd5fe..b689a091 100644
1616--- a/src/ocrmypdf/_exec/jbig2enc.py
1717+++ b/src/ocrmypdf/_exec/jbig2enc.py
18- @@ -14,7 +14,7 @@ from ocrmypdf.subprocess import get_version, run
19-
18+ @@ -15,7 +15,7 @@ from ocrmypdf.subprocess import get_version, run
2019
2120 def version() -> Version:
22- - return Version(get_version('jbig2', regex=r'jbig2enc (\d+(\.\d+)*).*'))
23- + return Version(get_version('@jbig2@', regex=r'jbig2enc (\d+(\.\d+)*).*'))
24-
25-
26- def available():
27- @@ -27,7 +27,7 @@ def available():
21+ try:
22+ - version = get_version('jbig2', regex=r'jbig2enc (\d+(\.\d+)*).*')
23+ + version = get_version('@jbig2@', regex=r'jbig2enc (\d+(\.\d+)*).*')
24+ except CalledProcessError as e:
25+ # TeX Live for Windows provides an incompatible jbig2.EXE which may
26+ # be on the PATH.
27+ @@ -33,7 +33,7 @@ def available():
2828
2929 def convert_group(cwd, infiles, out_prefix, threshold):
3030 args = [
@@ -33,7 +33,7 @@ index 5a34a95a..5ee1b333 100644
3333 '-b',
3434 out_prefix,
3535 '--symbol-mode', # symbol mode (lossy)
36- @@ -44 ,7 +44 ,7 @@ def convert_group(cwd, infiles, out_prefix, threshold):
36+ @@ -50 ,7 +50 ,7 @@ def convert_group(cwd, infiles, out_prefix, threshold):
3737
3838
3939 def convert_single(cwd, infile, outfile, threshold):
@@ -65,7 +65,7 @@ index 5b8600d0..fcad771b 100644
6565 '--skip-if-larger',
6666 '--quality',
6767diff --git a/src/ocrmypdf/_exec/tesseract.py b/src/ocrmypdf/_exec/tesseract.py
68- index fab92bb1..78b634a7 100644
68+ index 102bdab8..bfef4400 100644
6969--- a/src/ocrmypdf/_exec/tesseract.py
7070+++ b/src/ocrmypdf/_exec/tesseract.py
7171@@ -95,7 +95,7 @@ class TesseractVersion(Version):
@@ -96,10 +96,10 @@ index fab92bb1..78b634a7 100644
9696 args.extend(['-l', '+'.join(langs)])
9797 if engine_mode is not None:
9898diff --git a/src/ocrmypdf/_exec/unpaper.py b/src/ocrmypdf/_exec/unpaper.py
99- index 493d9b3a..578c2dda 100644
99+ index d1165c46..7c732b15 100644
100100--- a/src/ocrmypdf/_exec/unpaper.py
101101+++ b/src/ocrmypdf/_exec/unpaper.py
102- @@ -70 ,7 +70 ,7 @@ class UnpaperImageTooLargeError(Exception):
102+ @@ -48 ,7 +48 ,7 @@ class UnpaperImageTooLargeError(Exception):
103103
104104
105105 def version() -> Version:
@@ -108,7 +108,7 @@ index 493d9b3a..578c2dda 100644
108108
109109
110110 @contextmanager
111- @@ -92 ,7 +92 ,7 @@ def _setup_unpaper_io(input_file: Path) -> Iterator[tuple[Path, Path, Path]]:
111+ @@ -70 ,7 +70 ,7 @@ def _setup_unpaper_io(input_file: Path) -> Iterator[tuple[Path, Path, Path]]:
112112 def run_unpaper(
113113 input_file: Path, output_file: Path, *, dpi: DecFloat, mode_args: list[str]
114114 ) -> None:
0 commit comments