AspxToPdf Class

Renders any .Net Web Page (ASPX) into a PDF Document. Simply add it to the Page_Load event.

Not available in .Net Core because ASPX is superseded by the MVC model

Inheritance Hierarchy
SystemObject
  IronPdfAspxToPdf

Namespace:  IronPdf
Assembly:  IronPdf (in IronPdf.dll) Version: 2020.10.3
Syntax
public static class AspxToPdf
Methods
  NameDescription
Public methodStatic memberRenderThisPageAsPdf(ActionPdfDocument, PdfPrintOptions)
Automatically renders this ASPX page into PDF and returns that PDF document in an callback. Use it in the Page_Load Event.
Public methodStatic memberRenderThisPageAsPdf(AspxToPdfFileBehavior, String, PdfPrintOptions)
Automatically renders any ASPX page into PDF instead of Html. Use it in the Page_Load Event.

Example:

protected void Page_Load(object sender, EventArgs e){ 
             IronPdf.AspxToPdf.RenderThisPageAsPdf(FileBehavior.Attachment, "MyPdf.pdf", new  PdfPrintOptions(){ Dpi =
             300 }); }
Top
See Also
Download DLL or Install with Nuget