fix tesseract
All checks were successful
Push image to registry / build-image (push) Successful in 4m44s
All checks were successful
Push image to registry / build-image (push) Successful in 4m44s
This commit is contained in:
@ -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 '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user