ByteScout PDF SDK – VB.NET – Convert – HTML to PDF


Imports System.Drawing.Printing
Imports Bytescout.PDF.Converters

Module Module1

    Sub Main()

		Using converter As New HtmlToPdfConverter()

			converter.PageSize = PaperKind.A4
			converter.Orientation = PaperOrientation.Portrait
			converter.Footer = "<p style=""color: blue;"">FOOTER TEXT</p>"

			converter.ConvertHtmlToPdf("sample.html", "result.pdf")
			' You can also pass a link instead of the input file:  
			'converter.ConvertHtmlToPdf("", "result.pdf")

		End Using

		' Open result file in default PDF viewer

    End Sub

End Module