converting text to pdf?

Posted by Samba Siva on Stack Overflow See other posts from Stack Overflow or by Samba Siva
Published on 2013-10-23T09:52:23Z Indexed on 2013/10/23 9:53 UTC
Read the original article Hit count: 118

Filed under:
|
  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?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about c#-4.0