iTextSharp Pdf Library
I am using itextsharp library to generate pdf reports but the problem pdf displays the html tags along with the label text..It displays in pdf like this:
Lev 1 <font class="notes">(Level : Beginners)</font> 50%<br/><br/>
instead i want it to display
Lev 1 (Level : Beginners) 50%
Code Snippets:::
Pageload even::
if (!Page.IsPostBack)
{
Session["Percentage"] = Server.HtmlDecode(labelList.Text);
}
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
labelList.Text += dt0.Rows[0].ItemArray.GetValue(0).ToString() + " <font class=\"t1\">(Level : " + dt1.Rows[0].ItemArray.GetValue(0) + ")</font> " + percentage + "%<br/><br/>";
generate button code to generate pdf:
string str;
str = Server.HtmlDecode(Session["Percentage"].ToString());
cl = new iTextSharp.text.Cell(new Phrase(str, FontFactory.GetFont(FontFactory.TIMES_ROMAN, 8)));
cl.Width = 100;
cl.Border = 0;
cl.Colspan = 3;
//cl.BackgroundColor = Color.LIGHT_GRAY;
table.AddCell(cl);
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Hope this helps for a solution...
Thanx in advance...