tballison commented on PR #3096:
URL: https://github.com/apache/tika/pull/3096#issuecomment-5513854932
Like this?
```
{
"presets": {
"render-thumbnails": {
"pdf-parser": { "imageStrategy": "RENDER_PAGES_AT_PAGE_END",
"maxRenderedPages": 1,
"ocr": { "dpi": 150, "imageType": "RGB" } }
},
"our-archival-ocr": {
"pdf-parser": { "ocr": { "strategy": "OCR_AND_TEXT_EXTRACTION",
"dpi": 300 } }
}
}
}
(First block overrides a built-in by name — admin wins over Tika; second
is a purely custom one.)
Parse time — the reference lives in the config part, next to (and under)
the request's own parse-context:
{ "presets": ["render-thumbnails"] }
on POST /rmeta/text/config for his index request — metadata, text, and
thumbnail in one parse. And the standalone "just give me a thumbnail, I don't
care" case is POST /unpack
with:
{ "presets": ["thumbnail"] }
where thumbnail is a second built-in preset that bundles render-thumbnails
plus the selection: thumbnail-unpack-selector (his ThumbnailSelector logic as
an UnpackSelector
component), unpack-config with Frictionless output, and embedded-limits.
One image plus its metadata comes back; no /unpack/thumbnail route needed. A
request can still layer its
own overrides: {"presets": ["render-thumbnails"], "parse-context":
{"pdf-parser": {...}}} — request wins, per component, which is exactly the
layering semantics
ThumbnailDefaults.applyTo already implements.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]