[jira] [Commented] (TIKA-3125) rmeta/text and unpack - the __TEXT__ file and X-TIKA:content differ by some leading new line characters

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (TIKA-3125) rmeta/text and unpack - the __TEXT__ file and X-TIKA:content differ by some leading new line characters

ASF GitHub Bot (Jira)

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

Tim Allison commented on TIKA-3125:
-----------------------------------

{{/unpack}} uses the {{BodyContentHandler}}, and {{/rmeta/text}} uses the {{ToTextContentHandler()}}.  I just realized that this is undocumented, but if you try {{/rmeta/body}}, you should get equal content.

> rmeta/text and unpack - the __TEXT__ file and X-TIKA:content differ by some leading new line characters
> -------------------------------------------------------------------------------------------------------
>
>                 Key: TIKA-3125
>                 URL: https://issues.apache.org/jira/browse/TIKA-3125
>             Project: Tika
>          Issue Type: Bug
>            Reporter: Nicholas DiPiazza
>            Priority: Major
>         Attachments: test-ooxml.docx
>
>
> Using the attached docx file, when I parse it with
> {{/unpack}}
> Endpoint I get {{__TEXT__}} file that contains my this:
> {code:java}
> [[bookmark: _GoBack]Launching ms word
> Sadfsadfsaf
> Asdfsafsafasfsafd
> Asdf2
> Asfd3
> asfd
> {code}
> But when I parse it with {{/rmeta/text}} I get a {{X-TIKA:content}} field that contains:
> {code:java}
> Launching ms word
> Sadfsadfsaf
> Asdfsafsafasfsafd
> Asdf2
> Asfd3
> asfd
> {code}
> Why do these differ? Seems like there a bunch of leading \n characters to start out on the {{/rmeta/text}} endpoint? And there is this strange {{[[bookmark: _GoBack]}} that I wasn't expecting too. Not sure what that means. Perhaps they are just fundamentally different outputs and this is normal behavior?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)