Chore: render zone OCR pages through the shared pdftoppm helper

pdftoppm was called in three places with different options. Missing-binary handling is dropped since pdftoppm and tesseract are required at startup.
This commit is contained in:
stumpylog committed 2026-11-18 14:51:40 -08:00
1 parent c1bb327f1f
commit 409539d4d1
7 files changed
+217 -176

No files matched your search

+11 -2
View File
@@ -164,14 +164,23 @@ def run_subprocess(
check_exit_code: bool = True,
log_stdout: bool = True,
log_stderr: bool = True,
timeout: float | None = None,
) -> CompletedProcess:
"""
Runs a subprocess and logs its output, checking return code if requested
Runs a subprocess and logs its output, checking return code if requested.
A timeout, in seconds, raises subprocess.TimeoutExpired once exceeded.
"""
proc_name = arguments[0]
completed_proc = run(args=arguments, env=env, capture_output=True, check=False)
completed_proc = run(
args=arguments,
env=env,
capture_output=True,
check=False,
timeout=timeout,
)
if logger:
logger.info(f"{proc_name} exited {completed_proc.returncode}")