Add Russian + Arabic OCR support (tur+eng+rus+ara)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
salvacybersec
2026-04-07 01:58:45 +03:00
parent 50f1d08c62
commit 792e951e62

View File

@@ -345,7 +345,7 @@ def is_scanned_pdf(file_path):
return False return False
def ocr_pdf(file_path, language="tur+eng", dpi=200): def ocr_pdf(file_path, language="tur+eng+rus+ara", dpi=200):
"""OCR a scanned PDF in-place. Returns True on success.""" """OCR a scanned PDF in-place. Returns True on success."""
import tempfile import tempfile
tmp_fd, tmp_path = tempfile.mkstemp(suffix=".pdf", dir=file_path.parent) tmp_fd, tmp_path = tempfile.mkstemp(suffix=".pdf", dir=file_path.parent)