Last post Oct 04, 2010 04:27 PM by Daniel Morkla
Oct 03, 2010 10:12 PM|Daniel Morkla|LINK
'Create Document class object and set its size to letter and give space left, right, Top, Bottom Margin
HTML to PDF Converter
html to pdf converting component for asp.net
Oct 04, 2010 12:03 AM|Amit.A|LINK
You can take help from:
Oct 04, 2010 08:14 AM|Daniel Morkla|LINK
I have reviewed your options. Thanks very much for your help.
It looks like I have to re-code the whole sub routine.
I'm surprised that itext doesn't have the ability to render the html text directly into pdf unless the html text String is
coded in multiple chunks and paragraphs.
I will have to do it the long way but if any one has any tip for me please share.
Oct 04, 2010 02:18 PM|hans_v|LINK
I'm surprised that itext doesn't have the ability to render the html text directly into pdf
Where did you hear this? iTextSharp does have a build in HTML parser, although it is not very powerfull, it only supports a limited amount of tags. And why are you surprised if it was true? If you think is it easy to convert HTML into a pdf, create a pdf
Public Sub HTMLtoPDF(ByVal html As String)
Dim ms As New MemoryStream()
Dim document As New Document()
Dim writer As PdfWriter = PdfWriter.GetInstance(document, ms)
Dim reader As New StringReader(html)
Dim parser As New simpleparser.HTMLWorker(document)
Response.ContentType = "application/pdf"
Response.OutputStream.Write(ms.GetBuffer(), 0, ms.GetBuffer().Length)
Oct 04, 2010 03:03 PM|Daniel Morkla|LINK
It was not my intention to give Itextsharp a negative press. I was simply searching for a simple ways of solving a problem.
Of course, I respect the fact that it is even free for all to share and use.
Sorry if I offended you.
Thanks for your effort any way.
Oct 04, 2010 04:27 PM|Daniel Morkla|LINK
It works like magic. You are a star!!