Public Class pdf_html_element
    Inherits System.Web.UI.Page

    Protected Sub BtnCreatePdf_Click(sender As Object, e As EventArgs)
        ' create a new pdf document
        Dim doc As New PdfDocument()

        ' add a new page to the document
        Dim page As PdfPage = doc.AddPage()

        ' create html element 
        Dim html As New PdfHtmlElement(TxtUrl.Text)

        ' add the html element to the document
        page.Add(html)

        ' save pdf document
        doc.Save(Response, False, "Sample.pdf")

        ' close pdf document
        doc.Close()
    End Sub

End Class