CSHTML a PDF (Páginas Razor) This code example demonstrates the process of converting a Razor page into PDFs. To achieve this in an ASP.NET Core Web App, you'll require two packages: IronPdf.Extensions.Razor and IronPdf. These packages work together to enable the rendering of Razor pages into PDFs. By rendering from Razor pages, you gain access to the full range of features provided by the RenderingOptions class. The resulting PDF document can be further edited or exported as needed. How to Convert Razor Pages to PDFs in C# Install the IronPDF Library for Razor Page Conversion Instantiate the ChromePdfRenderer class Pass the current Razor page to the RenderRazorToPdf method View the PDF document in the browser or download it to the desktop In this example, the Razor page's content is rendered into a PDF using IronPdf's ChromePdfRenderer. You can specify rendering options, such as paper size and title, through RenderingOptions. The generated PDF can be saved as a file or directly served as content for browser display. The response headers can be adjusted to allow for inline display or file download. Learn to Convert Razor Pages to PDFs with IronPDF Ver en GitHub Código https://github.com/iron-software/IronPdf.Examples/tree/main/examples/cshtml-to-pdf-razor 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