Click here to Skip to main content
11,641,708 members (62,246 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: VB.NET
How to convert div.innerhtml to PDF. I used itextsharp for convert to PDF. but textbox and sigplus(Activex signature) controls are not converted and it displayed empty field in PDF.
Dim pdfDoc As New Document(PageSize.A4, 10.0F, 10.0F, 10.0F, 0.0F)
                PdfWriter.GetInstance(pdfDoc, System.Web.HttpContext.Current.Response.OutputStream)
                Dim htmlarraylist As ArrayList = iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(New StringReader(HtmlDiv.InnerHtml), Nothing)
                For k As Integer = 0 To htmlarraylist.Count - 1
                    pdfDoc.Add(DirectCast(htmlarraylist(k), IElement))
                Response.ContentType = "application/pdf"
                Response.AddHeader("content-disposition", "attachment;filename=" & DateTime.Now.ToString("ddMMyyyyHHmm") & ".pdf")
Posted 5-Feb-13 22:29pm
Edited 6-Feb-13 3:12am
(no name)138.1K
Tadit Dash at 6-Feb-13 6:56am
Please post codes what have you tried so far.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 DamithSL 253
1 Mika Wendelius 160
2 Sergey Alexandrovich Kryukov 134
3 OriginalGriff 110
4 Afzaal Ahmad Zeeshan 79
0 Mika Wendelius 460
1 OriginalGriff 265
2 DamithSL 258
3 CPallini 169
4 Afzaal Ahmad Zeeshan 149

Advertise | Privacy | Mobile
Web01 | 2.8.150731.1 | Last Updated 6 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100