On 3/31/2014 5:44 AM, Vimal Malani wrote:

I am not able to write Arabic text in unix os. Arabic text is printed as blank.

below is my java code for same.

Font f = new Font(BaseFont.createFont(fontPath, BaseFont.IDENTITY_H, BaseFont.EMBEDDED), 8, Font.NORMAL);

Font f1 = new Font(BaseFont.createFont(fontPath, BaseFont.CP1250, BaseFont.EMBEDDED), 8, Font.NORMAL);

Several reasons:
- fontPath may be wrong or doesn't point to a font that knows how to display Arabic, - CP1250 is not the encoding you should use for Arabic (it's the encoding for Polish, Czech, Slovak, Hungarian, Slovene, Bosnian, Croatian, Serbian (Latin script), Romanian and Albanian), nor is CP1252 (a super-set of Latin-1) or CP1257 (Estonian, Latvian and Lithuanian). - *As documented*: document.add() doesn't support Arabic ligatures; READ THE DOCUMENTATION!
For instance:
http://itextpdf.com/themes/keyword.php?id=410
http://support.itextpdf.com/node/74
------------------------------------------------------------------------------
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to