AspxToPdfRenderThisPageAsPdf Method

Overload List
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.


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