Razor a PDF (Blazor Server) This example demonstrates how a Razor component can be converted into a PDF document. The IronPdf.Extensions.Blazor package is an extension of the main IronPdf package. To convert a Razor component's content page to a PDF, both the IronPdf.Extensions.Blazor and the primary IronPdf packages are required. In the code example below, a model called PersonInfo has already been created. In the OnInitializedAsync method, we insert multiple new PersonInfo objects into the persons List. We then associate the persons List with the string "persons" in the Parameters dictionary. In the PrintToPdf method, we instantiate the ChromePdfRenderer class. To convert the Razor component to a PDF document, we use the RenderRazorComponentToPdf method. In the code example, we pass the Parameters dictionary to the method for rendering. How to Convert Razor Components to PDFs in Blazor Server Install IronPDF from NuGet for Razor component conversion in C# Prepare a model to store the information Instantiate the ChromePdfRenderer class Pass the Dictionary object containing the data to the RenderRazorComponentToPdfAsync method Download the resulting PDF document to the desktop Learn to Convert Razor Components to PDF in Blazor Server Ver en GitHub Código https://github.com/iron-software/IronPdf.Examples/tree/main/examples/razor-to-pdf-blazor-server Descargar ZIP Tutorial Relacionado Guía de Cómo Hacer Relacionada Documentación de Clase Obtener Paquetes de Idiomas Descargar IronPDF DLL Reportar un problema en esta página ¿Listo para empezar? Nuget Descargas 16,154,058 | Versión: 2025.11 recién lanzado Descarga Gratis de NuGet Descargas totales: 16,154,058 Ver Licencias
Producto completamente funcional Obtén 30 días de producto completamente funcional.Instálalo y ejecútalo en minutos.
Soporte técnico 24/5 Acceso completo a nuestro equipo de soporte técnico durante tu prueba del producto
Producto completamente funcional Obtén 30 días de producto completamente funcional.Instálalo y ejecútalo en minutos.
Soporte técnico 24/5 Acceso completo a nuestro equipo de soporte técnico durante tu prueba del producto