Rahul Bansal

Rahul Bansal

  • 110
  • 17.1k
  • 10m

Hindi text in to ItextSharp Pdf

Feb 4 2015 3:59 AM
I am Fetching Hindi text from database and  displaying it into runtime pdf using Itextsharp but at the time of display, text is not in proper hindi.
 
 
BaseFont bf = BaseFont.CreateFont(HttpContext.Current.Server.MapPath("font\\ARIALUNI.TTF"), BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
iTextSharp.text.Font font = new iTextSharp.text.Font(bf, 8, iTextSharp.text.Font.NORMAL); 
TblGrid.AddCell(new PdfPCell(new Phrase(PartA_9to23[i, 1], font)) { BorderWidth = 1, HorizontalAlignment = 0, FixedHeight = 18f }); 

Answers (4)