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

Itai Shaked commented on PDFBOX-4402:
-------------------------------------

I have not tried it, although in theory it should work but only for the most 
simple cases (i.e. a single RTL language with no hyphenation and other 
languages mixed in).   

For more complex cases there is probably no alternative to using an 
implementation of the Unicode BiDi algorithm, which is quite complicated but 
works well (or at least - is consistent with most current software). You can 
try using 
[ICU4J|http://icu-project.org/apiref/icu4j/com/ibm/icu/text/Bidi.html] assuming 
you want a Java solution. 

 

Even with such solutions existing it may be beneficial to (at some point in the 
future) support RTL internally in PDFBox, as strings in files thus created will 
be reversed, so users opening the PDF in a viewer will have to search for the 
string םולש whenever they want to find שלום etc. 

> Write RTL text in reversed order
> --------------------------------
>
>                 Key: PDFBOX-4402
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4402
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.13
>            Reporter: steve neo
>            Priority: Major
>              Labels: RTL
>         Attachments: Screen Shot 2018-12-10 at 2.03.46 pm.png
>
>
> I use PDPageContentStream.showText() to write string to PDF.  It doesn't work 
> for RTL text, for example Hebrew, all text are written in reversed order.  
> See attached example screenshot. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to