[ 
https://issues.apache.org/jira/browse/TIKA-4854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18109544#comment-18109544
 ] 

ASF GitHub Bot commented on TIKA-4854:
--------------------------------------

dschmidt commented on code in PR #3094:
URL: https://github.com/apache/tika/pull/3094#discussion_r3887721344


##########
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-apple-module/src/main/java/org/apache/tika/parser/iwork/iwana/IWork18PackageParser.java:
##########
@@ -71,28 +77,68 @@ public void parse(TikaInputStream tis, ContentHandler 
handler, Metadata metadata
             zipStream = new ZipInputStream(tis);
         }
 
-        // For now, just detect
+        // Detect the type, and emit the document preview as the thumbnail;
+        // the content itself is not parsed yet
+        XHTMLContentHandler xhtml = new XHTMLContentHandler(handler, metadata, 
context);
+        xhtml.startDocument();

Review Comment:
   Registered with the stream now (setOpenContainer), so it is closed with it, 
as the zip container detector does.





> Emit the preview image of iWork '09 and iWork '18 packages as a THUMBNAIL 
> embedded resource
> -------------------------------------------------------------------------------------------
>
>                 Key: TIKA-4854
>                 URL: https://issues.apache.org/jira/browse/TIKA-4854
>             Project: Tika
>          Issue Type: Improvement
>            Reporter: Dominik Schmidt
>            Priority: Major
>
> IWork13PackageParser emits preview.jpg as a THUMBNAIL embedded document. The 
> two other iWork package parsers do not emit any embedded documents: 
> IWorkPackageParser (iWork '09, QuickLook/Thumbnail.jpg) only parses the index 
> XML, and IWork18PackageParser only detects the media type although the 
> package carries preview.jpg as well. Both previews should be emitted as 
> THUMBNAIL like the '13 one, so a client gets the representative image of 
> every iWork file the same way.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to