-
Notifications
You must be signed in to change notification settings - Fork 615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BidiLine - Handling of indexChars when runDirection is LTR (or RTL) #122
Comments
Thanks for reporting this. Can you (or someone else) please submit a pull-request to fix it? This change was caused by the license cleanup and removal of BidiOrder class, to make OpenPDF more LGPL license compliant. See the lines removed from misc_licenses.txt in commit a0754dc, in particular UNICODE, INC. LICENSE AGREEMENT. Is the Unicode license LGPL and MPL compatible? It might seem so: https://www.gnu.org/licenses/license-list.en.html#Unicode BidiOrder was removed, because of the Unicode license, and to be "on the safe side". Perhaps BidiOrder can be added again, if we are sure it is safe to use? PdfWriter.RUN_DIRECTION_LTR and PdfWriter.RUN_DIRECTION_RTL is deprecated in version 1.2.6 of OpenPDF. Hopefully we can find a good solution to this. |
I'll keep working on this today. My main motivation is also to be "on the safe side" and use OpenPDF in place of iText 2.1.7. Specifically, I'm looking at using it with JasperReports. Since JasperReports is meant to support bidirectional text, there needs to be some option for outputting RTL if they are going to adopt OpenPDF. Thoughts? |
@PaulCormier Excellent idea. I think you working on supporting OpenPDF in JasperReports will help other people in the same situation. I will gladly review and merge any changes. Most languages are left-to-right, and only very few are right-to-left (Arabic is one example). |
There is also this: Jaspersoft/jasperreports#17 |
In commit a0754dc, lines 183 to 197 of BidiLine were removed because of the removal of the BidiOrder class. But when a runDirection is set to either
PdfWriter.RUN_DIRECTION_LTR
orPdfWriter.RUN_DIRECTION_RTL
the indexChars array (used by createArrayOfPdfChunks) is no longer initialized correctly. The array is used on line 461 to pick the right letters out of the detailChunks array. When it is all 0s only the first letter is ever printed.The text was updated successfully, but these errors were encountered: