Click here to Skip to main content
16,011,542 members

Comments by Er_Bhupendra (Top 2 by date)

Er_Bhupendra 9-Jul-14 2:35am View    
thanks for your advice but when i post data on other website, how is it possible to get it there?
Er_Bhupendra 15-Feb-13 2:31am View    
i was copied your code and implement it in my project, but still i am facing the error.
The number of columns in PdfPTable constructor must be greater than zero.
the below is my code.
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=ulcact.pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
this.Page.RenderControl(hw);
Document pdfDoc = new Document(PageSize.A2, 7f, 7f, 7f, 0f);
PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
pdfDoc.Open();
StringReader sr = new StringReader(sw.ToString());
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
htmlparser.Parse(sr);//error should be gone
pdfDoc.Close();
Response.Write(pdfDoc);
Response.End();

Reply me as soon as possible,