Dim appPath As String = HttpContext.Current.Request.ApplicationPath Dim path As String = Server.MapPath(appPath & "/Attachments/Test.pdf") Dim sw As New StringWriter() Dim hw As New HtmlTextWriter(sw) Panel1.RenderControl(hw) Dim output = New FileStream(path, FileMode.Create) Dim sr As New StringReader(sw.ToString()) Dim pdfDoc As New iTextSharp.text.Document(PageSize.A4, 10.0F, 10.0F, 50.0F, 0.0F) Dim htmlparser As New HTMLWorker(pdfDoc) iTextSharp.text.pdf.PdfWriter.GetInstance(pdfDoc, output) pdfDoc.Open() htmlparser.Parse(sr) pdfDoc.Close()
Dim columnWidths_new As Single() = New Single() {5.0F, 30.0F, 15.0F} table_new.SetWidths(columnWidths_new)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)