Laravel wrapper for Tesseract OCR
I would first like to thank thiagoalessio for his work on the Tesseract OCR for PHP package. I leaned heavily on that code to make this.
One of the main differences between this package and thiagoalessio's is that this package does not have compatibility for PHP prior to version 7.3. This package has exceptions thrown in the event that certain required PHP functions are not available. Those functions being exec
, proc_open
, prog_get_status
, proc_close
, file_get_contents
, file_exists
, fread
, fwrite
, fclose
, stream_set_blocking
. Some hosting providers or server configurations may have them disabled for security reasons and in those cases you should be informed of why an image scan failed.
Installation
You can install this package via composer:
composer require captbrogers/laravel-tesseract-ocr
You can publish the config file with:
php artisan vendor:publish --provider="Captbrogers\TesseractOcr\TesseractOcrServiceProvider" --tag="laravel-tesseract-ocr-config"
This is the contents of the published config file:
return [
];
Usage
$tesseract = new Captbrogers\TesseractOcr();
$tesseract->lang('deu')
->dpi(300)
->run();
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.