dschmidt commented on PR #3148:
URL: https://github.com/apache/tika/pull/3148#issuecomment-5592445393
High level this fits both of my use cases, but it ships only one of them.
The "just give me the thumbnail" case is covered by this PR as is: the
selector keeps exactly one file in the zip, so my client doesn't need any
picking logic anymore, and NO_OCR + skipOcr + maxPages 1 keep the parse cheap.
PUT /unpack/preset/thumbnails, done. That fully replaces my endpoint from #3096.
My other use case is indexing: metadata, full text and all embedded files in
one request, with OCR left on, but previews still rendered (PDF page 1,
EMF/WMF) so I get dimensions etc. That needs a second catalog preset: no
selector (I want all embedded files), no NO_OCR, and crucially maxRenderedPages
instead of maxPages, because cutting the text off at page 1 is exactly what I
can't have there. Something like:
```json
"render-thumbnails": {
"pdf-parser": { "imageStrategy": "RENDER_PAGES_AT_PAGE_END",
"maxRenderedPages": 1,
"ocr": { "dpi": 96, "imageType": "RGB" } },
"emf-parser": { "renderImage": true, "renderOnlyEmbeddedResourceTypes":
["THUMBNAIL"] },
"wmf-parser": { "renderImage": true, "renderOnlyEmbeddedResourceTypes":
["THUMBNAIL"] }
}
```
That's also the reason for #3146: the thumbnails preset here can arguably
keep maxPages 1 (cheaper, and /unpack discards the text anyway), but the
indexing preset can't work without maxRenderedPages.
--
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]