You have an ASP.NET Web Forms page that already looks right in the browser, and someone now wants the same page as a PDF. Rebuilding that layout in a separate PDF library is slow and rarely matches the screen. ASPX to PDF Converter is part of the IronPDF library for .NET. It renders the ASPX page you already have.
Quick facts
- Type: .NET library for C# and VB.NET, installed through NuGet (a DLL download and a Windows installer are also offered)
- Requires: .NET Framework 4.0 or above
- Rendering: built-in Chromium engine
- Trial: 30-day free trial that is fully functional and can be deployed to live servers without restrictions
- Licensing: commercial licences are sold on the vendor's licensing page
Key features
Turn an ASPX page into a PDF with one line in Page_Load
Calling AspxToPdf.RenderThisPageAsPdf() makes the page return a PDF instead of HTML. You can have the PDF open in the browser or download as a file.
Control the output through render options
The ChromePdfRenderOptions class lets you set a PDF title, switch JavaScript on or off, and decide whether HTML forms become interactive PDF forms. Paper size, margins and CSS media type are also available.
Render HTML strings, files and live URLs, not just ASPX
The same ChromePdfRenderer handles HTML strings, HTML files and URLs. It also handles images, with JavaScript, CSS and image assets loaded from a base path.
Add headers and footers with page numbers and dates
You can use text or full HTML headers and footers. Merge fields include page, total pages, URL, date, time and title.
Edit the PDF after you create it
You can merge PDFs, add a cover page, remove pages, copy a page range into a new file, and edit metadata. Passwords, permissions and read-only protection are supported as well.
Who it's for
You are a .NET developer maintaining Web Forms or other ASP.NET sites who needs invoices, reports or printable pages as PDFs. It suits you if you want the PDF to look like the page in Chrome. It does not suit you if you want a ready-made desktop converter, because this is a code library with no end-user interface.
Pros and cons
Pros
- Chromium rendering, so output follows how the page looks in a browser
- One-line ASPX conversion, with C# and VB.NET samples
- One library for creating, converting, editing and securing PDFs
- Free trial with no restrictions on live servers
Cons
- It is a developer library, so you need to write code to use it
- It is a commercial product and needs a paid licence for production use
- Rendering untrusted HTML needs web security enabled, which blocks local assets
FAQs
Do I need to rebuild my page to get a PDF?
No. You add the render call to the page's Page_Load event, and the page's own output becomes the PDF.
Which languages can I use?
C# and VB.NET both have code samples. The library also covers F# projects.
Can it convert things other than ASPX?
Yes. It converts HTML strings, HTML files, URLs and image files.
Can I try it before buying?
Yes. A 30-day trial is offered with full functionality.
How do I install it?
Use the NuGet package with Install-Package IronPdf, or use the DLL download or Windows installer.
System requirements
You need .NET Framework 4.0 or above and a Visual Studio project in C# or VB.NET.