IRONSOFTWAREHOME
Async PDF Generation
using IronPdf;

// Instantiate Renderer
var renderer = new ChromePdfRenderer();

// All IronPdf Rendering methods have Async equivalents
var pdf = await renderer.RenderHtmlAsPdfAsync("<h1>Html with CSS and Images</h1>");

// Export to a file or Stream
pdf.SaveAs("async_example.pdf");
Imports IronPdf

' Instantiate Renderer
Dim renderer = New ChromePdfRenderer()

' All IronPdf Rendering methods have Async equivalents
Dim pdf = Await renderer.RenderHtmlAsPdfAsync("<h1>Html with CSS and Images</h1>")

' Export to a file or Stream
pdf.SaveAs("async_example.pdf")
NuGet Download
PM > Install-Package IronPdf
Async PDF Generation

Async PDF Generation

IronPDF supports asynchronous PDF generation, allowing for optimized performance and efficiency in PDF generation tasks. By using the await keyword along with IronPDF's RenderHtmlAsPdfAsync method, you can efficiently create PDF documents without hurting your system's performance.

Steps to Asynchronous PDF Generation

To begin, we create a new ChromePdfRenderer instance, utilizing IronPDF's powerful rendering engine to generate pixel-perfect PDF documents. Once this is done, we have access to the method we need to generate a PDF document from the given HTML string. At this stage, we use the await keyword to pause the execution of our async method until the PDF generation is complete. The RenderHtmlAsPdfAsync method takes the HTML input and renders it into a PDF asynchronously, improving performance by avoiding blocking operations.

The final step is to save the generated PDF document to a specified file name and location using the SaveAs method. Beyond this basic example, IronPDF's asynchronous PDF generation methods can be used in situations such as generating large batches of PDF documents in a more performance-friendly manner.

Explore Asynchronous PDF Generation with IronPDF
View on GitHub

Ready to Get Started?

Nuget Downloads 20,878,335Version:2026.9just released

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required