Skip to content

Commit 7c60a16

Browse files
authored
Merge pull request #10 from domfahey/codex/find-and-fix-critical-bug
Fix streaming detection flag
2 parents ca7e4e8 + 90082f9 commit 7c60a16

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/pdf_ocr_pipeline/ocr.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# stdlib
1212

1313
from pathlib import Path
14-
from typing import List, Any, Tuple, Union
14+
from typing import List, Any, Tuple, Union, Optional
1515

1616
# internal
1717
import shutil
@@ -23,10 +23,11 @@
2323
logger = get_logger(__name__)
2424

2525
# ---------------------------------------------------------------------------
26-
# Force streaming disabled to avoid silent failures with pdftoppm → tesseract piping.
27-
# Always use the temporary‑file fallback path for robustness.
26+
# Whether ``pdftoppm`` supports piping image data directly to ``stdout``.
27+
# ``None`` means the capability has not been probed yet. The value is cached
28+
# after the first call to :func:`ocr_pdf`.
2829
# ---------------------------------------------------------------------------
29-
_STREAMING_SUPPORTED: bool = False
30+
_STREAMING_SUPPORTED: Optional[bool] = None
3031

3132
# ---------------------------------------------------------------------------
3233
# Early binary availability check (skipped under *pytest* to keep tests fast)

0 commit comments

Comments
 (0)