https://issues.apache.org/bugzilla/show_bug.cgi?id=55645

--- Comment #4 from Paolo <paolo.asi...@gmail.com> ---
(In reply to Nick Burch from comment #3)
> Not all richly formatted text in Outlook is done using RTF! Does your
> message have a HTML chunk instead?
> 
> Take a look at the Tika Outlook parser if you want a detailed example of
> using HSMF to process msg files:
> https://svn.apache.org/repos/asf/tika/trunk/tika-parsers/src/main/java/org/
> apache/tika/parser/microsoft/OutlookExtractor.java

You're right, but I already get text, html and RTF and looks like there was
none.

So I thought there may be some kind of bug, since Outlook showed some formatted
text.

Here is and extract of my code:

try {
    this.messaggioHTML = msg.getHtmlBody();
    if (MainActivity.DEBUG) {
        android.util.Log.d(MainActivity.TAG, "HTML Body: "
                + this.messaggioHTML);
    }
} catch (ChunkNotFoundException e) {
    android.util.Log.e(MainActivity.TAG,
            "HTML Body: not found");
    this.messaggioHTML = "";
}

try {
    this.messaggioTesto = msg.getTextBody();
    if (MainActivity.DEBUG) {
        android.util.Log.d(MainActivity.TAG, "TXT Body: "
                + this.messaggioTesto);
    }
} catch (ChunkNotFoundException e) {
    android.util.Log.e(MainActivity.TAG,
            "TXT  Body: not found");
    this.messaggioTesto = "";
}

try {
    String messaggioRtf = msg.getRtfBody();

    if (MainActivity.DEBUG) {
        android.util.Log.d(MainActivity.TAG, "RTF Body: "
                + messaggioRtf);
    }

} catch (ChunkNotFoundException e) {
    android.util.Log.e(MainActivity.TAG,
            "RTF  Body: not found");
} catch (Exception e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to