Tesseract
A PHP wrapper for the Tesseract OCR engine
Install / Use
/learn @ddeboer/TesseractREADME
Tesseract: a wrapper for the Tesseract OCR engine
A small PHP >=5.3 library that makes working with the open source Tesseract OCR engine easier.
Installation
You need a working Tesseract installation. For more information about installation and adding language support, see Tesseract’s README.
Then install this library, which is available on Packagist, through Composer:
$ composer require ddeboer/tesseract:1.0
Usage
If the tesseract binary is in your path, just do:
use Ddeboer\Tesseract\Tesseract;
$tesseract = new Tesseract();
Otherwise, construct Tesseract with the path to the binary:
$tesseract = new Tesseract('/usr/local/bin/tesseract');
Get version and supported languages information:
$version = $tesseract->getVersion();
$languages = $tesseract->getSupportedLanguages();
Perform OCR on an image file:
$text = $tesseract->recognize('myfile.tif');
Optionally, specify the language(s) as second argument:
$text = $tesseract->recognize('myfile.tif', array('nld', 'eng'));
And specify Tesseract’s page seg mode as third argument:
$text = $tesseract->recognize('myfile.tif', null, Tesseract::PAGE_SEG_MODE_AUTOMATIC_OSD);
Related Skills
node-connect
349.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。

