ASPX To PDF Settings

C# + VB.Net: ASPX To PDF Settings ASPX To PDF Settings
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);
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 allows adds 2 new options:
- Changing the PDF file Name
- Your PDF may be displayed directly in the web browser, or as a file download.