CSHTML을 PDF로 변환(MVC 코어)

이 코드 예제는 뷰를 PDF로 변환하는 과정을 보여줍니다.

IronPdf.Extensions.Mvc.CoreIronPdf 두 패키지는 함께 작동하여 뷰를 PDF로 렌더링할 수 있도록 합니다. IronPdf.Extensions.Mvc.Core 패키지는 IronPdf의 확장 기능으로, 뷰를 PDF로 렌더링할 수 있도록 합니다.

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에서 CSHTML 뷰를 PDF로 변환하는 방법을 알아보세요.

시작할 준비 되셨나요?
Nuget 다운로드 17,527,568 | 버전: 2026.2 방금 출시되었습니다