You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Jukka Zitting (Commented) (JIRA)" <ji...@apache.org> on 2011/10/18 12:14:10 UTC

[jira] [Commented] (TIKA-754) Automatic line break insertion (BR element) instead of '\n' in XHTMLContentHandler

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

Jukka Zitting commented on TIKA-754:
------------------------------------

I don't think it's necessarily a good idea to make an assumption like this in XHTMLContentHandler.

It's better to explicitly emit an <br/> element in a specific Parser implementation when it's clear that the underlying document format really does indicate a hard line break instead of just a soft one that could/should be positioned differently if the displayed line length changes.
                
> Automatic line break insertion (BR element) instead of '\n' in XHTMLContentHandler
> ----------------------------------------------------------------------------------
>
>                 Key: TIKA-754
>                 URL: https://issues.apache.org/jira/browse/TIKA-754
>             Project: Tika
>          Issue Type: Improvement
>    Affects Versions: 0.10, 1.0
>            Reporter: Pablo Queixalos
>            Priority: Minor
>             Fix For: 1.0
>
>         Attachments: TIKA-754.poc.patch
>
>
> As seen with some parsers (PDF, PPT), some text blocks still contains text carriage returns ('\n') in the outputted XHTML. 
> A global fix for this could be located in XHTMLContentHandler.characters(...).
> By analyzing the given char array, when a '\n' char is encountered insert a BR element instead.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira