My Header Text is always blank. Below is my code
Response.ContentType ="application/pdf"
Response.AddHeader("content-disposition", "attachment;filename=GridViewExport.pdf")
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Dim sw AsNew StringWriter()Dim hw AsNew HtmlTextWriter(sw)
gridview1.AllowPaging =False
gridview1.DataBind()
gridview1.RenderControl(hw)
Dim sr AsNew StringReader(sw.ToString())Dim pdfDoc AsNew Document(iTextSharp.text.PageSize.A4, 10.0F, 10.0F, 10.0F, 0.0F)Dim htmlparser AsNew HTMLWorker(pdfDoc)
PdfWriter.GetInstance(pdfDoc, Response.OutputStream)
pdfDoc.Open()
htmlparser.Parse(sr)
pdfDoc.Close()
Response.Write(pdfDoc)
Response.End()