converting text to pdf?
- by Samba Siva
PdfWriter.GetInstance(document, new FileStream(Server.MapPath("~/") + "pdf/" + "print.pdf", FileMode.Create));
// document.NewPage();
document.Open();
List<IElement> htmlarraylist = iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(
new StringReader(lblArticle.Text), null);
for (int k = 0; k < htmlarraylist.Count; k++)
{
document.Add((IElement)htmlarraylist[k]);
}
Paragraph mypara = new Paragraph();
document.Add(mypara);
here,lblArticle.Text is "Label" control..but I want to .txt page to be converting in to pdf.what can i try?please tell me?