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

Gregory Lepore commented on TIKA-5076:
--------------------------------------

Preferring HTML makes sense, RTF can be a mess.

I checked 27 unique standalone MSG files in our local EA-PDF sample. Ten 
contained a non-empty stored HTML body, and all ten lacked PidTagNativeBody. So 
the count for “HTML is present and the flag explicitly names another format” 
was 0 of 10 in this sample. Three of the ten also had a compressed RTF body and 
PidTagRtfInSync=true.

Exposing the raw flag when present and adding opt-in extractAllAlternatives for 
MSG would work for our use case. 

> Outlook MSG parser ignores PidTagNativeBody when an HTML alternative is 
> present.
> --------------------------------------------------------------------------------
>
>                 Key: TIKA-5076
>                 URL: https://issues.apache.org/jira/browse/TIKA-5076
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 4.2.0
>            Reporter: Gregory Lepore
>            Priority: Minor
>         Attachments: html.msg, plain.msg, rtf.msg
>
>
> Outlook MSG parser chooses HTML over the body declared by PidTagNativeBody
> In Tika 4.2.0, OutlookExtractor in tika-parser-microsoft-module returns the 
> HTML body when an MSG declares a usable plain-text or RTF body as its native 
> format. The attached MSGs contain different text in each body, so the choice 
> changes the extracted content. 
> Steps to reproduce
> Parse the three attached synthetic MSGs with Tika 4.2.0’s OfficeParser. 
> Inspect the extracted XHTML and MAPI.BODY_TYPES_PROCESSED.
> Tika reports HTML for all three. When the MSG declares a native body and that 
> body can be read, Tika should extract that representation.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to