Sheo,
Your solution for html parsing in iTextSharp is the closest I've come to this problem yet.
My need is a little bit different, I'm filling a PDF form with data from my ASP.NET app... below is the relevant code with "MySummary" being an object that contains html.
I don't have a list so I tried "HTMLWorker.ReferenceEquals" but then the PDF form field just gets filled with "False" I'm not sure how to interpret this, other than I've obviously got something wrong... can you help?
thanks in advance... Lee
-----start code--------------
'instantiate the PDFReader object.
Dim reader As New PdfReader(CoverPageTemplate)
Using fs As New FileStream(pdfFile, FileMode.Create)
'Get the PDF file into stamper object
Dim stamper As New PdfStamper(reader, fs)
'Get fields from the PDF file
Dim fields As AcroFields = stamper.AcroFields
'Set form fields
fields.SetField("pdfID", MyID)
fields.SetField("pdfType", MyType)
fields.SetField("pdfUnit", MyUnit)
fields.SetField("pdfID", MyID)
fields.SetField("pdfCreateDate", MyCreateDate)
'instantiate the TXTreader object.
Dim TXTreader As New StringReader(MySummary())
MySummary = HTMLWorker.ReferenceEquals(TXTreader, New StyleSheet())
fields.SetField("pdfSummary", HttpUtility.HtmlDecode(MySummary))
fields.SetField("pdfSummary", HttpUtility.HtmlDecode(MySummary))
fields.SetField("pdfRelitem", MyID)
'flatten form fields and close document
stamper.FormFlattening = True
stamper.Close()
End Using
----------end code---------------
SheoNarayan, if this helps please login to Mark As Answer. | Alert Moderator