dessop / ocr
DESSOP OCR API PHP SDK
v1.0.0
2026-09-15 21:50 UTC
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.8
Requires (Dev)
- phpunit/phpunit: ^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Official PHP SDK for the DESSOP OCR API.
Package: dessop/ocr
API: https://ocr.dessop.com
Requirements
- PHP 8.2+
- Composer 2+
Installation
composer require dessop/ocr
Configuration
use Dessop\Ocr\OcrClient; $ocr = new OcrClient( 'https://ocr.dessop.com', getenv('DESSOP_OCR_API_KEY'), 300, );
Process a document
$result = $ocr->process('/path/to/document.pdf'); if ($result->successful()) { echo $result->text(); }
Available methods:
$result->jobId(); $result->filename(); $result->pages(); $result->text(); $result->client(); $result->data(); $result->get('some.nested.value');
Health check
if ($ocr->health()) { // DESSOP OCR is available. }
Exceptions
OcrAuthenticationExceptionOcrValidationExceptionOcrTimeoutExceptionOcrServerExceptionOcrException
Security
Never hardcode the API key. Store it in an environment variable or secret manager. Never log the key or send it to frontend code.
License
MIT. Copyright (c) 2026 DESSOP.