ASPX To PDF Settings

C# + VB.Net: ASPX To PDF Settings ASPX To PDF Settings
// Install IronPdf with Nuget:  PM> Install-Package IronPdf
using IronPdf;

private void Form1_Load(object sender, EventArgs e)
    PdfPrintOptions PdfOptions = new PdfPrintOptions()
        DPI = 300,
        EnableJavaScript = false,
        //.. many more options available

AspxToPdf.RenderThisPageAsPDF(AspxToPdf.FileBehaviour.Attachment,"MyPdfFile.pdf", PdfOptions);
' Install IronPdf with Nuget:  PM> Install-Package IronPdf
Imports IronPdf

Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
	Dim PdfOptions As New PdfPrintOptions() With {
		.DPI = 300,
		.EnableJavaScript = False

AspxToPdf.RenderThisPageAsPDF(AspxToPdf.FileBehaviour.Attachment,"MyPdfFile.pdf", PdfOptions)
End Sub

ASP.NET ASPX to PDF functionality allows the full set of options available when rendering HTML from a string or file, but adds 2 new options:
- Changing the PDF file name
- Your PDF may be displayed directly in the web browser, or as a file download.