User-174653821 posted
Hi Help needed i am useing following code to create pdf from a page in this page i have one table runat server with id =tblall and in that table i have one more table name tbltotal which is gettting rows run time. now all the code is working fine except
not showing rows of tbltotal.
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=Quotation.pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
tblall.RenderControl(hw);
StringReader sr = new StringReader(sw.ToString());
Document pdfDoc = new Document(PageSize.A4, 10f, 10f, 10f, 0f);
pdfDoc.AddHeader("this is header part ", "this is header content remeber spell");
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
pdfDoc.Open();
htmlparser.Parse(sr);
pdfDoc.Close();
Response.Write(pdfDoc);
Response.End();
i text was using after that i format machine so i have to again instal it or what