CSHTML a PDF (MVC Core) This code example demonstrates the process of converting Views into PDFs. Two packages, IronPdf.Extensions.Mvc.Core and IronPdf, work together to enable the rendering of Views into PDFs. The IronPdf.Extensions.Mvc.Core package serves as an extension to IronPdf, enabling the rendering of Views to PDFs. Use the RenderRazorViewToPdf method to render Views to PDFs. This method requires an IRazorViewRenderer, the path to the ".cshtml" file, and the data required to display on the ".cshtml" file. Please visit the How to Convert View to PDF in ASP.NET Core MVC how-to article to learn more. This action also enables you to access the full range of features provided by the RenderingOptions class, such as applying page numbers in PDFs with IronPDF, adding text and HTML headers and footers with IronPDF, and customizing PDF paper size. The resulting PDF document can be further edited or exported as needed. How to Convert CSHTML Files to PDFs in ASP.NET MVC Core Install the C# library for converting CSHTML files to PDFs in C# Instantiate the ChromePdfRenderer class Use the RenderRazorViewToPdf method for rendering Pass an IRazorViewRenderer object and the CSHTML file path to the method Download the resulting PDF document to the desktop Learn to Convert CSHTML Views to PDFs in ASP.NET MVC Core. Ver en GitHub Código https://github.com/iron-software/IronPdf.Examples/tree/main/examples/cshtml-to-pdf-mvc-core 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