You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "John Hewson (JIRA)" <ji...@apache.org> on 2014/08/06 00:09:12 UTC

[jira] [Comment Edited] (PDFBOX-2252) PDFTextStripper has problem with bilingual documents

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

John Hewson edited comment on PDFBOX-2252 at 8/5/14 10:08 PM:
--------------------------------------------------------------

Flipping the lines would seem problematic too (though still an improvement), how would it handle:

{quote}
A line with an arabic العربية word embedded.
{quote}


was (Author: jahewson):
Flipping the lines would seem problematic too, how would it handle:

{quote}
A line with an arabic العربية word embedded.
{quote}

> PDFTextStripper has problem with bilingual documents
> ----------------------------------------------------
>
>                 Key: PDFBOX-2252
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2252
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Text extraction
>    Affects Versions: 1.8.6
>            Reporter: Amir
>            Priority: Critical
>         Attachments: test.pdf
>
>
> When the input document of PDFTextStripper is a combination of right-to-left and left-to-right languages, the output characters of one language is reversed. 
> A sample bilingual pdf document is attached.
> PDFTextStripper has a variable "isRtlDominant" in "writePage" function, which is defined as follows:     boolean isRtlDominant = rtlCount > ltrCount;
> This class clearly count the number of rtl characters and decide if the whole content should be revered or not. It's not true, it must operate on each word, not the whole document.



--
This message was sent by Atlassian JIRA
(v6.2#6252)