locked
table rows not shoing in pdf exported by itext RRS feed

  • Question

  • 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

    Monday, August 8, 2011 5:51 AM

Answers

  • User-174653821 posted

    NOPE thanks problem solve it was the problem of postback i havnt use is post back property in page load.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, August 11, 2011 5:41 AM

All replies

  • User3866881 posted

    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.

    Wednesday, August 10, 2011 11:46 PM
  • User-174653821 posted

    NOPE thanks problem solve it was the problem of postback i havnt use is post back property in page load.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, August 11, 2011 5:41 AM