Dim cliid As String = Request("fromaccid") Dim doc As New Document() Dim UrlDirectory As [String] = Request.Url.GetLeftPart(UriPartial.Path) UrlDirectory = UrlDirectory.Substring(0, UrlDirectory.LastIndexOf("/") + 1) Response.Write(UrlDirectory) Dim getcurrtime As String() = Split(DateTime.Now.TimeOfDay.ToString, ".") Dim dt As String = ClsDate.GetFormatedDate(ClsApplvl.Getserverdt(), "DD/MM/YYYY") PdfWriter.GetInstance(doc, New FileStream(Server.MapPath("../TRANSACTIONPDF/" & cliid & " " & dt & ".pdf"), FileMode.Create)) 'iTextSharp.text.html.simpleparser.StyleSheet. doc.Open() Dim htmlText As [String] = strhtml Dim htmlarraylist As List(Of IElement) = iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(New StringReader(htmlText), Nothing) Dim font As iTextSharp.text.Font = FontFactory.GetFont("Times-Roman", 10, 1, iTextSharp.text.BaseColor.GRAY) For k As Integer = 0 To htmlarraylist.Count - 1 Dim x As IElement = DirectCast(htmlarraylist(k), IElement) Response.Write(x.Type.ToString() + "#<br>") Next Dim mypara = New Paragraph() mypara.InsertRange(0, htmlarraylist) mypara.Font = font doc.Add(mypara) doc.Close()</br>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)