CSHTML'den PDF'ye (MVC Core)
Bu kod örneği, Görünümleri PDF'lere dönüştürme sürecini göstermektedir.
Iki paket, IronPdf.Extensions.Mvc.Core ve IronPdf, Gorunumlerin PDF'lere dönüştürulmesini saglamak icin birlikte calisir. IronPdf.Extensions.Mvc.Core paketi, IronPdf 'a bir uzanti olarak hizmet eder ve Gorunumlerin PDF'lere dönüştürulmesini saglar.
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.
ASP.NET MVC Core'da CSHTML Dosyalarını PDF'ye Dönüştürme
- CSHTML dosyalarını PDF'lere dönüştürmek için C# kütüphanesini yükleyin
ChromePdfRenderersınıfını başlatınRenderRazorViewToPdfmetodunu render alma için kullanınIRazorViewRenderernesnesini ve CSHTML dosya yolunu metoda aktarın- Oluşan PDF belgesini masaüstüne indirin
ASP.NET MVC Core'da CSHTML Görünümlerini PDF'lere Dönüştürmeyi Öğrenin.

