<pre lang="C#">I am using itexhsharp to generate , On local server it is working but giving me warning iTextSharp.text.html.simpleparser.HTMLWorker is absolote and On the server it is not working and not generating pdf file any one can give me solutions for this error</pre>My code is here :
Response.ContentType = "application/pdf"
Response.AddHeader("content-disposition", "attachment;filename=Vasundhara" + Date.Today + ".pdf")
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Dim sw As New StringWriter()
Dim hw As New HtmlTextWriter(sw)
repeaterName.RenderControl(hw)
Dim sr As New StringReader(sw.ToString())
Dim pdfDoc As New Document(PageSize.A4, 50.0F, 50.0F, 40.0F, bottom)
Dim htmlparser As New HTMLWorker(pdfDoc)
PdfWriter.GetInstance(pdfDoc, Response.OutputStream)
pdfDoc.Open()
Try
htmlparser.Parse(sr)
Catch ex As Exception
Finally
pdfDoc.Close()
End Try
'htmlparser.Parse(sr)
'pdfDoc.Close()
Response.Write(pdfDoc)
Response.End()

Rajeev PunhaniPosted Mar 3, 2016, 6:43 AM
Hi Aman,
In that case use xmlworkerhttp://jwcooney.com/2012/12/30/generate-a-pdf-from-an-asp-net-web-page-using-the-itextsharp-xmlworker-namespace/
Mohammad AmanPosted Mar 3, 2016, 5:11 AM
Rajeev PunhaniPosted Mar 3, 2016, 12:52 AM
Hi Aman,
Please put
If the above solution is helpful then,accept the answer.