Posted on: 8/21/2014 12:28:39 PM | Views : 1447

Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", "attachment;filename=Report.pdf"); Response.Cache.SetCacheability(HttpCacheability.NoCache); StringWriter sw = new StringWriter(); HtmlTextWriter hw = new HtmlTextWriter(sw); PrintPanel.RenderControl(hw); StringReader sr = new StringReader(sw.ToString()); Document pdfDoc = new Document(PageSize.A4, 10f, 10f, 100f, 0f); HTMLWorker htmlparser = new HTMLWorker(pdfDoc); PdfWriter.GetInstance(pdfDoc, Response.OutputStream); pdfDoc.Open(); htmlparser.Parse(sr); pdfDoc.Close(); Response.Write(pdfDoc); Response.End(); Hai all,

By using iTextSharp.dll i am trying to download particular panel in to pdf file. But i am getting Illegal characters ...

Go to the complete details ...