異步 PDF 生成 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 在 GitHub 上查看 代碼 https://github.com/irondarrius/IronPdf.Examples/tree/main/examples/async 下載 ZIP 相關教學 相關操作指南 類別文檔 取得語言包 下載 IronPDF DLL 回報此頁面的問題 準備好開始了嗎? Nuget 下載 16,154,058 | 版本: 2025.11 剛剛發布 免費 NuGet 下載 總下載量:16,154,058 查看許可證