LibrePDF / OpenPDF

OpenPDF is a free Java library for creating and editing PDF files, with a LGPL and MPL open source license. OpenPDF is based on a fork of iText. We welcome contributions from other developers. Please feel free to submit pull-requests and bugreports to this GitHub repository.
Other
3.63k stars 598 forks source link

Arabic Text Not Appearing in Generated PDF #938

Open HectorSponsor opened 1 year ago

HectorSponsor commented 1 year ago

I am experiencing a problem when trying to add Arabic text to the PDF. Even following the example on the link below, I only get blank space on the generated PDF.

https://github.com/LibrePDF/OpenPDF/blob/bff6520a368fe0a35b443740a36cba108f4ed1a4/pdf-toolbox/src/test/java/com/lowagie/examples/fonts/styles/RightToLeft.java

ColumnText and PdfTable didn't work to show the Arabic text. It's important to note that I used the same font as in the example (as well as other fonts) and the Arabic text was in its Unicode escape characters.

Environment:

Please let me know if there's any other information required to investigate and address this issue. Thank you.

andreasrosdal commented 1 year ago

أهلا ومرحبا. نرحب بطلبات السحب.

asturio commented 9 months ago

A minimal code example will be appreciated. Does it work with simple Paragraphs and Phrases?

Pull requests are welcome.