OpenPDF
OpenPDF copied to clipboard
RTL Issue with english and arabic content in single PDF
Issue: I use both arabic and english in my pdf. I need arabic content to be in RTL (right to left) and english to be in LTR (Left to right) and I tried to achieve RTL by enabling layoutprocessor. However both English and arabic are displayed in RTL direction.
To Reproduce: import com.lowagie.text.pdf.LayoutProcessor; LayoutProcessor.enable(java.awt.Font.LAYOUT_RIGHT_TO_LEFT);
Used the above mentioned code to enable RTL. Reference Document: https://github.com/LibrePDF/OpenPDF/wiki/Accents,-DIN-91379,-non-Latin-scripts
Expected behavior Need English to be in LTR and arabic contents to be in RTL.
Please check and assist on how to resolve on this.
Use LayoutProcessor.enable();
for automatic selection of direction for each chunk of text.
Not a bug, description is clarified.