We help IT Professionals succeed at work.

Display aspx in pdf

dlavar
dlavar asked
on
Is there anyway i can load an aspx page using doc.Add()?  The pdf appears but I would like for another page such as the history page to display.
Here's my code.  I haven't been able to find anything thus far.
Dim doc As Document = New Document
        PdfWriter.GetInstance(doc, New FileStream(Request.PhysicalApplicationPath + "\2.pdf", FileMode.Create))
        doc.Open()
        doc.Add(New Paragraph("Hello World"))

        doc.Close()
        Response.Redirect("~/1.pdf")

Open in new window

Comment
Watch Question

Senior software engineer
CERTIFIED EXPERT
Commented:
Are you using iText# ?

If so, here is a page which explains how to convert HTML into PDF.
http://forums.asp.net/t/1199774.aspx/1
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014

Commented:
Do you mean you want to export an aspx page to PDF?

See this

http://aspdotnetcodebook.blogspot.com/2009/04/how-to-convert-web-page-to-pdf.html

Explore More ContentExplore courses, solutions, and other research materials related to this topic.