fix tesseract
All checks were successful
Push image to registry / build-image (push) Successful in 4m44s

This commit is contained in:
2025-07-01 11:57:51 +02:00
parent a57cbffbeb
commit fcc78fd560

View File

@ -9,7 +9,13 @@ class TesseractImageOCR implements IImageOCR
* @inheritDoc
*/
public function performOCR(string $filePath): string {
$tesseract = new TesseractOCR($filePath);
return $tesseract->run();
try {
$tesseract = new TesseractOCR($filePath);
return $tesseract->run();
} catch (\Exception $e) {
// Handle the exception, log it, or rethrow it as needed
// For now, we just return an empty string
return '';
}
}
}