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");
vaibh
Member
175 Points
88 Posts
table rows not shoing in pdf exported by itext
Aug 08, 2011 09:51 AM|LINK
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
MCTS Web Application
Software Developer
http://www.vaibhavmayee.com
If u like the solution then mark as answer !!
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: table rows not shoing in pdf exported by itext
Aug 11, 2011 03:46 AM|LINK
Hello vaibh:)
It seems that you are using iText???
If yes, considering it's realted to a 3-rd party control. Plz go to http://support.itextpdf.com/forum and ask for more.
Thx again.
vaibh
Member
175 Points
88 Posts
Re: table rows not shoing in pdf exported by itext
Aug 11, 2011 09:41 AM|LINK
NOPE thanks problem solve it was the problem of postback i havnt use is post back property in page load.
MCTS Web Application
Software Developer
http://www.vaibhavmayee.com
If u like the solution then mark as answer !!