[
https://issues.apache.org/jira/browse/TIKA-1033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15226427#comment-15226427
]
Tim Allison commented on TIKA-1033:
-----------------------------------
I added detection by looking into the CompObj bytes in POIFSContainerDetector.
My first attempt extracted the {{progID}} and then passed that information
through the Metadata, as Yegor recommended. However, the equivalent in pptx,
xlsx and xls was not immediately clear. It was simpler to add the detection
for all four container files in one place in POIFSContainerDetector.
When I tried to copy and paste that chart/graph into Word, it was saved as a
non-visible xls or xlsx in doc and docx respectively. I think I remember from
last time I looked into this, that these objects don't exist in doc/docx.
It would be great if we could add extraction, but I don't think I'll be able to
work on that any time soon. Any takers?
> Tika doesn't parse embedded OLE Chart/Graph objects
> ---------------------------------------------------
>
> Key: TIKA-1033
> URL: https://issues.apache.org/jira/browse/TIKA-1033
> Project: Tika
> Issue Type: Bug
> Components: parser
> Reporter: Michael McCandless
> Priority: Minor
> Attachments: emb.ppt, testMSChart-govdocs-428996.pptx
>
>
> I have an example ppt that embeds a chart, but Tika mis-identifies it
> as an XLS document.
> The progID (oleShape.getProgID() in
> HSLFExtractor.handleSlideEmbeddedResources) is MSGraph.Chart.8 ... and
> we seem to detect it as Excel (application/vnd.ms-excel) but then the
> ExcelExtractor hits this exception:
> {noformat}
> org.apache.poi.hssf.record.RecordFormatException: Unable to construct record
> instance
> at
> org.apache.poi.hssf.record.RecordFactory$ReflectionConstructorRecordCreator.create(RecordFactory.java:65)
> at
> org.apache.poi.hssf.record.RecordFactory.createSingleRecord(RecordFactory.java:301)
> at
> org.apache.poi.hssf.record.RecordFactoryInputStream.readNextRecord(RecordFactoryInputStream.java:285)
> at
> org.apache.poi.hssf.record.RecordFactoryInputStream.nextRecord(RecordFactoryInputStream.java:251)
> at
> org.apache.poi.hssf.eventusermodel.HSSFEventFactory.genericProcessEvents(HSSFEventFactory.java:143)
> at
> org.apache.poi.hssf.eventusermodel.HSSFEventFactory.processEvents(HSSFEventFactory.java:106)
> at
> org.apache.tika.parser.microsoft.ExcelExtractor$TikaHSSFListener.processFile(ExcelExtractor.java:302)
> at
> org.apache.tika.parser.microsoft.ExcelExtractor.parse(ExcelExtractor.java:147)
> {noformat}
> Since DelegatingParser silently suppresses all exceptions, when you
> run TikaCLI you won't see any exception nor text extracted, but if you
> run with -z, it will save 1.xls which if you then try to parse with
> TikaCLI hits the above exception.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)