hi,I want to export grid data in pdf format this is my following code,problem occur
as pdf open but data not display. please help me ??? to solving problem
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=UserDetails.pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
GrdATDataView.AllowPaging = false;
GrdATDataView.DataBind();
GrdATDataView.RenderControl(hw);
GrdATDataView.HeaderRow.Style.Add("width", "15%");
GrdATDataView.HeaderRow.Style.Add("font-size", "10px");
GrdATDataView.Style.Add("text-decoration", "none");
GrdATDataView.Style.Add("font-family", "Arial, Helvetica, sans-serif;");
GrdATDataView.Style.Add("font-size", "8px");
StringReader sr = new StringReader(sw.ToString());
Document pdfDoc = new Document(PageSize.A2, 7f, 7f, 7f, 0f);
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
pdfDoc.Open();
htmlparser.Parse(sr);
Response.Write(pdfDoc);
pdfDoc.Close();
Response.End();