You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tika.apache.org by Markus Mandalka <ti...@mandalka.name> on 2018/04/09 15:00:24 UTC
Tika Server: Disable OCR / Tesseract by HTTP parameter?
Hello,
is it possible to optional disable OCR (by Tesseract) in Tika Server by
a HTTP / HEADER / POST / GET / REST-API parameter (i.e. for some but not
all documents) instead of disable it global in tika.xml config or
uninstall Tesseract like in the documentation
https://wiki.apache.org/tika/TikaOCR ?
Best regards,
Markus
Re: Tika Server: Disable OCR / Tesseract by HTTP parameter?
Posted by Markus Mandalka <ti...@mandalka.name>.
Hello,
Am 11.04.2018 um 14:16 schrieb Allison, Timothy B.:
> Others may be more familiar with tika-server and OCR, but I notice that we do process X-Tika-OCR prefixed headers to configure TesseractOCRConfig . If you set "tesseractPath" to something bogus, that may turn off OCR...give something like this a try:
>
> --header "X-Tika-OCRTesseractPath:/bogosity"
>
thank you very much!
I had not expected the path config parameter is setable by HTTP header.
It works (if i use HTTP PUT for upload the file).
If i use(d) HTTP POST (which in Tika documentation can be used too and
works for analysis with default config of Tika Server) to upload the
file, settings in HTTP HEADER don't work (like the setting of the OCR
dictionary).
But this is maybe not a problem in Tika but could be a problem of my
pycurl parameters.
Best regards
Markus
RE: Tika Server: Disable OCR / Tesseract by HTTP parameter?
Posted by "Allison, Timothy B." <ta...@mitre.org>.
Others may be more familiar with tika-server and OCR, but I notice that we do process X-Tika-OCR prefixed headers to configure TesseractOCRConfig . If you set "tesseractPath" to something bogus, that may turn off OCR...give something like this a try:
--header "X-Tika-OCRTesseractPath:/bogosity"
-----Original Message-----
From: Markus Mandalka [mailto:tika@mandalka.name]
Sent: Monday, April 9, 2018 11:00 AM
To: user@tika.apache.org
Subject: Tika Server: Disable OCR / Tesseract by HTTP parameter?
Hello,
is it possible to optional disable OCR (by Tesseract) in Tika Server by a HTTP / HEADER / POST / GET / REST-API parameter (i.e. for some but not all documents) instead of disable it global in tika.xml config or uninstall Tesseract like in the documentation https://wiki.apache.org/tika/TikaOCR ?
Best regards,
Markus