Hi,
1 . I am receiving Arabic characters along with English characters( or
numbers ) in a single word of string from webservice. But while writing
into PDF using iText it is writing characters only from left to right. I
am writing in Cell of PdfPTable object. If English, It should be Left to
right and if Arabic it should be Right to left.
2. Also I am using font as arialuni.ttf. The Arabic characters are
written as distinct characters not a joint characters as it is coming
from webservice.The attachament Text Format - English & Arabic.JPG shows
both format. One is actual string comes from host & another is code
generated.
Could you please suggest what should I change in coding?
The code snippet is,
BaseFont bf1;
Font font2;
bf1 = BaseFont.createFont("c:/windows/fonts/arialuni.ttf",
BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
font2 = new Font(bf1, 10);
myPhrase = new Phrase(data[6], font2);
cell = new PdfPCell(new Paragraph(myPhrase));
cell.setColspan(16);
cell.setBorderColor(new Color(255,255,255));
cell.setHorizontalAlignment(Element.ALIGN_LEFT);
cell.setVerticalAlignment(Element.ALIGN_TOP);
table.addCell(cell);
Thanks & Regards,
Raja Mohammed.
<<attachment: Text Format - English & Arabic.JPG>>
------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
