AspxToPdf Methods

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
Install with Nuget