I have an aspx webpage that is getting parameters as querystring and i wanted to open that page and read it the lines and export it as a pdf, i am using the following code but it does not seems to work
 Dim strpath As String = Server.MapPath("pagename.aspx?id=0000")
        Dim sr As StreamReader = New StreamReader(strpath, False)
        Dim line As String
        line = sr.ReadToEnd
        sr.Close()
        ' Code to convert to pdf
        'Dim doc As New Document(PageSize.LETTER, 80, 50, 30, 65)
        Dim fsNew As New StringReader(line)
        Dim doc As New Document(PageSize.A4, 80, 50, 30, 65)
        Dim Styles As New StyleSheet()
        'stryle.LoadTagStyle("ol", "16,0")
        Using fs As New FileStream("newpdf.pdf", FileMode.Create)
            PdfWriter.GetInstance(doc, fs)
            Using stringReader As New StringReader(line)
                Dim parsedList = HTMLWorker.ParseToList(stringReader, Styles)
                doc.Open()
                ' parse each html object and add it to the pdf document
                For Each item As Object In parsedList
                    doc.Add(DirectCast(item, IElement))
                Next
                doc.Close()
            End Using
        End Using