Public Shared Function ExportHTM() Dim sbytes As [Byte]() Using mstream = New MemoryStream() Using PDF = New Document(iTextSharp.text.PageSize.A4, 5, 5, 15, 5) Using writer = PdfWriter.GetInstance( PDF, mstream ) PDF.Open() Using StringWriter= New StringWriter() Using HtmlTextWriter = New HtmlTextWriter(StringWriter) 'How to apply font and styles to pdfcontent' -- PDF content is a string and it contains html content Using StringReader = New StringReader(pdfcontent) Using htmlparser = New HTMLWorker( PDF) htmlparser.Parse(StringReader) End Using End Using End Using End Using PDF.Close() End Using End Using sbytes = mstream.ToArray() mstream.Close() End Using END function
Font
FontFactory
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)