vaites / php-apache-tika

Apache Tika bindings for PHP: extract text and metadata from documents, images and other formats
MIT License
116 stars 22 forks source link

X-Tika-OCRLanguage #31

Closed aleksanm closed 3 years ago

aleksanm commented 3 years ago

If there's an option to set more then one (default eng) OCR language?

vaites commented 3 years ago

There's no easy way to do it yet. Meanwhile you can add it with cURL options:

$client = Client::make('localhost:9998');
$client->setOption(CURLOPT_HTTPHEADER, 'X-Tika-OCRLanguage: eng+fra');

I will add soon specific methods to set HTTP headers and OCR languages.

vaites commented 3 years ago

I added specific methods on the v1.2.0 release. Thanks!