Hello everyone,
I have a little problem. I have to Display an Urdu font in PDF using iText.
i was going through a few examples and right now where i stand is that once
i run the following code.
Document document = new Document(PageSize.A4);
PdfWriter.getInstance(document, new FileOutputStream(
"right_to_left.pdf"));
document.open();
BaseFont bf = BaseFont.createFont("c:/windows/fonts/Fajer Noori
Nastalique
15-12-2006.ttf",
BaseFont.IDENTITY_H, true);
Font font = new Font(bf, 24);
String urdu = "\u0627\u0633\u062F";
document.add(new Paragraph(urdu, font));
the font is displayed but characters are not joined where as once i use add
these lines in the code
Document document = new Document(PageSize.A4);
PdfWriter.getInstance(document, new FileOutputStream(
"right_to_left.pdf"));
document.open();
BaseFont bf = BaseFont.createFont("c:/windows/fonts/Fajer Noori
Nastalique
15-12-2006.ttf",
BaseFont.IDENTITY_H, true);
Font font = new Font(bf, 24);
String urdu = "\u0627\u0633\u062F";
MultiColumnText mct = new MultiColumnText();
mct.addSimpleColumn(36, PageSize.A4.getWidth() - 36);
mct.setRunDirection(PdfWriter.RUN_DIRECTION_RTL);
mct.addElement(new Paragraph(urdu, font));
document.add(mct);
no font is displayed.
All i want to do is that i want that font to be properly displayed/printed
in PDF
Any help and pointers would be appreciated
Thanks
--
View this message in context:
http://www.nabble.com/Asian-Font-display-problem-%21-tf4543042.html#a12964816
Sent from the iText - General mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/