From 721b9b4fd115ee34b6b1b0fb4266437342956890 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Sat, 18 Oct 2025 10:58:57 +0530 Subject: [PATCH] addeed file path of ocr --- routes/web.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index 6c9243a..501b790 100644 --- a/routes/web.php +++ b/routes/web.php @@ -39,7 +39,12 @@ use thiagoalessio\TesseractOCR\TesseractOCR; } try { - $text = (new TesseractOCR($filePath))->lang('eng')->run(); + // $text = (new TesseractOCR($filePath))->lang('eng')->run(); + $text = (new TesseractOCR($filePath)) + ->executable('/usr/bin/tesseract') + ->lang('eng') + ->run(); + return response()->json(['success' => true, 'text' => $text]); } catch (\Exception $e) { return response()->json(['success' => false, 'error' => $e->getMessage()]);