[
https://issues.apache.org/jira/browse/TIKA-1477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14219234#comment-14219234
]
Hudson commented on TIKA-1477:
------------------------------
SUCCESS: Integrated in tika-trunk-jdk1.7 #325 (See
[https://builds.apache.org/job/tika-trunk-jdk1.7/325/])
TIKA-1477: Updated Tika resource to dynamically set TesseractOCRConfig and
PDFParserConfig files from custom headers (dmeikle:
http://svn.apache.org/viewvc/tika/trunk/?view=rev&rev=1640714)
*
/tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/ocr/TesseractOCRConfig.java
*
/tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/ocr/TesseractOCRConfigTest.java
* /tika/trunk/tika-server/src/main/java/org/apache/tika/server/TikaResource.java
> Add custom header processing to allow overriding of OCR and PDF configuration
> to be used in Tika Server
> -------------------------------------------------------------------------------------------------------
>
> Key: TIKA-1477
> URL: https://issues.apache.org/jira/browse/TIKA-1477
> Project: Tika
> Issue Type: Bug
> Components: server
> Reporter: Dave Meikle
> Assignee: Dave Meikle
> Priority: Minor
> Fix For: 1.7
>
>
> The _TesseractOCRParser_ and _PDFParser_ provide different configuration
> options via their dedicated config classes (_TesseractOCRConfig_ and
> _PDFParserConfig_). The settings these provide can be configured by creating
> an instance of the class and setting on the _ParseContext_ used during
> parsing.
> Whilst these can be set globally in configuration files via the classpath, it
> would also be good to allow these to be overridden for individual requests
> using custom HTTP Headers.
> It is proposed these are essentially made up of the following:
> * X-Tika-OCR<Property Name> for _TesseractOCRConfig_
> * X-Tika-PDF<Property Name> for _PDFParserConfig_
> For example, to set the language for the OCR parser you could send:
> {noformat}
> curl -T /path/to/somefile.pdf http://localhost:9998/tika --header
> "X-Tika-OCRLanguage: fra"
> {noformat}
> Or to ask the PDF Parser to extract inline images you could send:
> {noformat}
> curl -T /path/to/somefile.pdf http://localhost:9998/tika --header
> "X-Tika-PDFExtractInlineImages: true"
> {noformat}
> Properties set that do not exist would raise an HTTP 500 error.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)