IRONPDF 사용 Creating a PDF file in .NET MAUI Using IronPDF 커티스 차우 업데이트됨:6월 22, 2025 다운로드 IronPDF NuGet 다운로드 DLL 다운로드 윈도우 설치 프로그램 무료 체험 시작하기 LLM용 사본 LLM용 사본 LLM용 마크다운 형식으로 페이지를 복사하세요 ChatGPT에서 열기 ChatGPT에 이 페이지에 대해 문의하세요 제미니에서 열기 제미니에게 이 페이지에 대해 문의하세요 Grok에서 열기 Grok에게 이 페이지에 대해 문의하세요 혼란 속에서 열기 Perplexity에게 이 페이지에 대해 문의하세요 공유하다 페이스북에 공유하기 트위터에 공유하기 LinkedIn에 공유하기 URL 복사 이메일로 기사 보내기 The .NET Multi-platform App UI (.NET MAUI) is a cross-platform framework for creating native mobile and desktop apps with C# and XAML. You can use .NET MAUI to operate on Android, iOS, macOS, and Windows using a single code base. .NET MAUI is open-source and is an improvement over Xamarin Forms. The UI controls have been rewritten from the ground up for performance and extensibility. Additionally, it has expanded from the mobile platform to include desktop use cases. If you've ever used Xamarin Forms to create cross-platform user interfaces, then you'll find that the .NET MAUI framework has a lot in common with it. However, there are some differences. You can construct multi-platform apps with the .NET MAUI Framework using a single project, but you can add platform-specific code and resources if needed. One of the main goals of .NET MAUI is to allow you to write as much of your app logic and UI layout in a single code base as possible. .NET MAUI will be available for all platforms and will support the existing MVVM and XAML patterns. .NET MAUI allows developers to work on various platforms such as mobile development and Windows platforms. IronPDF Features IronPDF is a powerful PDF converter that can handle almost any task that a browser can handle. The .NET library for developers makes it simple to create, read, and manipulate PDF files. IronPDF uses the Google Chrome engine to convert HTML to PDF files. Among other web technologies, IronPDF supports HTML, ASPX, Converting Razor Pages to PDF with IronPDF, and MVC View. IronPDF supports Microsoft .NET applications (both ASP.NET Web Applications and traditional Windows Applications). IronPDF can also be used to make attractive PDF documents. IronPDF can create PDF files from HTML files with JavaScript and CSS containing JavaScript, CSS, and image files. Not only can convert HTML files to PDF with IronPDF, but you can also convert image files to PDF. IronPDF can help to create interactive PDF documents, fill out and submit interactive forms with IronPDF, merge and split PDF documents, extract text and images from PDFs from PDF documents, search text in PDF documents, rasterize PDF pages to images, convert PDF to HTML, and print PDF documents using IronPrint. IronPDF can generate a document from a URL. For login behind HTML using IronPDF for login forms, it also allows the use of custom network login credentials, user agents, proxies, cookies, HTTP headers, and form variables. IronPDF is a library that can read and fill in PDF documents and is capable of extracting images from documents. It allows us to add headers and footers to PDF files, text, photos, bookmarks for easier navigation, watermarks, and more to documents. It also allows us to join and split pages in a new or existing document. IronPDF is capable of converting documents to PDF objects without using an Acrobat viewer. It is also possible to convert a CSS file to a PDF document and CSS media-type files can be converted into documents. ## How to Create a PDF File in .NET MAUI Create a new .NET MAUI PDF Project in Visual Studio Install the IronPDF Library using NuGet Design the UI of the .NET MAUI Content Pages Use the ChromePdfRenderer.RenderHtmlAsPdf method to generate a PDF File Save the PDF file to users' devices with platform-specific code. Creating a New Project in Visual Studio Firstly, create a project using both Visual Studio Code and Visual Studio. When using Visual Studio Code, it is necessary to use the command-line tool to install the project type template. Open the Microsoft Visual Studio software and go to the File menu. Select "new project," and in the new project window select ".NET MAUI App." This article will use a .NET MAUI App to generate PDF documents and save them to a suitable location. Create a new project in Visual Studio Enter the project name and select the file path in the appropriate text box. Then, click the Create button, as in the screenshot below. Configure the project The Visual Studio project will now generate the structure for the selected application following the .NET MAUI App platform. It will now open the MainPage.cs file to add code and build/run the application. Adding code into the MainPage.cs file Next, install the library to test the code. Install the IronPDF Library The IronPDF Library can be downloaded and installed in four ways. These are: Using Visual Studio. Using the Visual Studio Command-Line. Direct download from the NuGet website. Direct download from the IronPDF website. Using Visual Studio The Visual Studio software provides the NuGet Package Manager option to install the package directly to the solution. The below screenshot shows how to open the NuGet Package Manager. Navigate to NuGet Package Manager UI This provides the search box to show the list of packages from the NuGet website. In the NuGet Package Manager, search for the keyword "IronPDF," as in the screenshot below. IronPDF package from NuGet Package Manager UI In the above image, the related search items are listed, select the first option to install the package to the solution. It will be installed on all the .NET MAUI application platforms such as the Android, iOS, and Windows platforms. Using the Visual Studio Command-Line In Visual Studio, go to Tools > NuGet Package Manager > Package Manager Console Enter the following line in the Package Manager Console tab: Install-Package IronPdf Now, the package will download/install to all the .NET MAUI platforms on the current project and be ready to use. Install the package in the Package Manager Console Direct Download from the NuGet Website The third way is to download the NuGet package directly from their website by accessing this IronPDF NuGet repository page. Select the download package option from the menu on the right-hand side. Double-click the downloaded package. It will be installed automatically. Reload the solution and the package should be usable in your project. Direct Download from the IronPDF Website Download the latest IronPDF ZIP package directly from their website. Once downloaded, follow the steps below to add the package to your project. Right-click the Dependencies option for the project from the solution window. Select the specific platform, then select the options reference and browse the location of the downloaded reference. Click OK to add the reference. You will also need to add references to all the .NET MAUI-supported platforms. Create PDFs on a .NET MAUI app using IronPDF When a project is created, there will be an auto-generated file called MainPage.xaml. This is where to put the UI of the .NET MAUI application. Follow the code below. <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="MAUI_PDF.MainPage" > <ScrollView> <VerticalStackLayout Spacing="25" Padding="30,0" VerticalOptions="Center"> <Image Source="dotnet_bot.png" SemanticProperties.Description="Cute .NET bot waving hi to you!" HeightRequest="200" HorizontalOptions="Center" /> <Label Text="Welcome to IronPDF!" SemanticProperties.HeadingLevel="Level1" FontSize="32" HorizontalOptions="Center" /> <Button x:Name="PdfBtn" Text="Click me to generate PDF" SemanticProperties.Hint="Click button to generate PDF" Clicked="GeneratePDF" HorizontalOptions="Center" /> </VerticalStackLayout> </ScrollView> </ContentPage> <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="MAUI_PDF.MainPage" > <ScrollView> <VerticalStackLayout Spacing="25" Padding="30,0" VerticalOptions="Center"> <Image Source="dotnet_bot.png" SemanticProperties.Description="Cute .NET bot waving hi to you!" HeightRequest="200" HorizontalOptions="Center" /> <Label Text="Welcome to IronPDF!" SemanticProperties.HeadingLevel="Level1" FontSize="32" HorizontalOptions="Center" /> <Button x:Name="PdfBtn" Text="Click me to generate PDF" SemanticProperties.Hint="Click button to generate PDF" Clicked="GeneratePDF" HorizontalOptions="Center" /> </VerticalStackLayout> </ScrollView> </ContentPage> XML Once the above code is added to the MainPage.xaml file, open the MainPage.xaml.cs file and include the following method inside of the MainPage class: private void GeneratePDF(object sender, EventArgs e) { ChromePdfRenderer renderer = new ChromePdfRenderer(); var doc = renderer.RenderHtmlAsPdf("<h1>Hello IronPDF!</h1> <p>I'm using IronPDF MAUI!</p>"); // Saves the memory stream as file. SaveService saveService = new SaveService(); saveService.SaveAndView("IronPDF HTML string.pdf", "application/pdf", doc.Stream); } private void GeneratePDF(object sender, EventArgs e) { ChromePdfRenderer renderer = new ChromePdfRenderer(); var doc = renderer.RenderHtmlAsPdf("<h1>Hello IronPDF!</h1> <p>I'm using IronPDF MAUI!</p>"); // Saves the memory stream as file. SaveService saveService = new SaveService(); saveService.SaveAndView("IronPDF HTML string.pdf", "application/pdf", doc.Stream); } $vbLabelText $csharpLabel The GeneratePDF method generates a new PDF document containing the text "Hello, IronPDF!..." and saves it on the users' computer at a specified location. In the method above, a new ChromePdfRenderer object is created and invokes the RenderHtmlAsPdf method to produce a new PDF document containing the words "Hello IronPDF! ..." from a string of HTML markup. Next, it will be delegated the saving of the file on the user's device to a separate class, called SaveService. This class will be created in the next step. The complete MainPage.xaml.cs file is given below. Please ensure that the file contents match what's shown below before continuing to the next step: // Change the namespace as desired, but make sure that all source files use this same namespace, // or there will be errors! namespace MAUI_IronPDF; // This namespace is required to make use of IronPDF functionality using IronPdf; public partial class MainPage : ContentPage { public MainPage() { InitializeComponent(); } private void GeneratePDF(object sender, EventArgs e) { ChromePdfRenderer renderer = new ChromePdfRenderer(); var doc = renderer.RenderHtmlAsPdf("<h1>Hello IronPDF!</h1> <p>I'm using IronPDF MAUI!</p>"); // Saves the memory stream as file. SaveService saveService = new SaveService(); saveService.SaveAndView("IronPDF HTML string.pdf", "application/pdf", doc.Stream); } } // Change the namespace as desired, but make sure that all source files use this same namespace, // or there will be errors! namespace MAUI_IronPDF; // This namespace is required to make use of IronPDF functionality using IronPdf; public partial class MainPage : ContentPage { public MainPage() { InitializeComponent(); } private void GeneratePDF(object sender, EventArgs e) { ChromePdfRenderer renderer = new ChromePdfRenderer(); var doc = renderer.RenderHtmlAsPdf("<h1>Hello IronPDF!</h1> <p>I'm using IronPDF MAUI!</p>"); // Saves the memory stream as file. SaveService saveService = new SaveService(); saveService.SaveAndView("IronPDF HTML string.pdf", "application/pdf", doc.Stream); } } $vbLabelText $csharpLabel Now, create a new class file called SaveService.cs in the root of the project and add the following source code: // Change the namespace as desired, but make sure that all source files use this same namespace, // or there will be errors! namespace MAUI_IronPDF { // SaveService partial class declaration ... this allows a layer of abstraction // as we implement the save file details specially for each platform on which this app will // operate! public partial class SaveService { public void SaveAndView(string filename, string contentType, MemoryStream stream) { SaveFile(filename, contentType, stream); } // Additional partial files will provide implementations for this method specifically. partial void SaveFile(string filename, string contentType, MemoryStream stream); } } // Change the namespace as desired, but make sure that all source files use this same namespace, // or there will be errors! namespace MAUI_IronPDF { // SaveService partial class declaration ... this allows a layer of abstraction // as we implement the save file details specially for each platform on which this app will // operate! public partial class SaveService { public void SaveAndView(string filename, string contentType, MemoryStream stream) { SaveFile(filename, contentType, stream); } // Additional partial files will provide implementations for this method specifically. partial void SaveFile(string filename, string contentType, MemoryStream stream); } } $vbLabelText $csharpLabel Since the implementation details for saving content on user devices vary with each platform (Windows, Android, macOS, etc), it is necessary to write platform-specific code for each device type that the application will support. To make this possible, we define SaveService as a partial class (for abstraction purposes) containing one partial method, called SaveAndView. Following this, the implementation of this method will be defined in a separate SaveService.cs partial class for one or more of the folders nested in the Platforms folder within the Solutions Explorer (see image below): The folder structure to implement cross-platform For simplicity, this tutorial will define the aforementioned partial file for the Windows platform only. Create a new SaveService.cs file under the Windows platform folder containing the code shown below: using Windows.Storage; using Windows.Storage.Pickers; using Windows.Storage.Streams; using Windows.UI.Popups; namespace MAUI_IronPDF; public partial class SaveService { async partial void SaveFile(string filename, string contentType, MemoryStream stream) { StorageFile stFile; string extension = Path.GetExtension(filename); // Gets process windows handle to open the dialog in application process. IntPtr windowHandle = System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle; if (!Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons")) { // Creates file save picker to save a file. FileSavePicker savePicker = new(); savePicker.DefaultFileExtension = ".pdf"; savePicker.SuggestedFileName = filename; // Saves the file as PDF file. savePicker.FileTypeChoices.Add("PDF", new List<string>() { ".pdf" }); WinRT.Interop.InitializeWithWindow.Initialize(savePicker, windowHandle); stFile = await savePicker.PickSaveFileAsync(); } else { StorageFolder local = ApplicationData.Current.LocalFolder; stFile = await local.CreateFileAsync(filename, CreationCollisionOption.ReplaceExisting); } if (stFile != null) { using (IRandomAccessStream zipStream = await stFile.OpenAsync(FileAccessMode.ReadWrite)) { // Writes compressed data from memory to file. using Stream outstream = zipStream.AsStreamForWrite(); outstream.SetLength(0); // Saves the stream as file. byte [] buffer = stream.ToArray(); outstream.Write(buffer, 0, buffer.Length); outstream.Flush(); } // Create message dialog box. MessageDialog msgDialog = new("Do you want to view the document?", "File has been created successfully"); UICommand yesCmd = new("Yes"); msgDialog.Commands.Add(yesCmd); UICommand noCmd = new("No"); msgDialog.Commands.Add(noCmd); WinRT.Interop.InitializeWithWindow.Initialize(msgDialog, windowHandle); // Showing a dialog box. IUICommand cmd = await msgDialog.ShowAsync(); if (cmd.Label == yesCmd.Label) { // Launch the saved file. await Windows.System.Launcher.LaunchFileAsync(stFile); } } } } using Windows.Storage; using Windows.Storage.Pickers; using Windows.Storage.Streams; using Windows.UI.Popups; namespace MAUI_IronPDF; public partial class SaveService { async partial void SaveFile(string filename, string contentType, MemoryStream stream) { StorageFile stFile; string extension = Path.GetExtension(filename); // Gets process windows handle to open the dialog in application process. IntPtr windowHandle = System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle; if (!Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons")) { // Creates file save picker to save a file. FileSavePicker savePicker = new(); savePicker.DefaultFileExtension = ".pdf"; savePicker.SuggestedFileName = filename; // Saves the file as PDF file. savePicker.FileTypeChoices.Add("PDF", new List<string>() { ".pdf" }); WinRT.Interop.InitializeWithWindow.Initialize(savePicker, windowHandle); stFile = await savePicker.PickSaveFileAsync(); } else { StorageFolder local = ApplicationData.Current.LocalFolder; stFile = await local.CreateFileAsync(filename, CreationCollisionOption.ReplaceExisting); } if (stFile != null) { using (IRandomAccessStream zipStream = await stFile.OpenAsync(FileAccessMode.ReadWrite)) { // Writes compressed data from memory to file. using Stream outstream = zipStream.AsStreamForWrite(); outstream.SetLength(0); // Saves the stream as file. byte [] buffer = stream.ToArray(); outstream.Write(buffer, 0, buffer.Length); outstream.Flush(); } // Create message dialog box. MessageDialog msgDialog = new("Do you want to view the document?", "File has been created successfully"); UICommand yesCmd = new("Yes"); msgDialog.Commands.Add(yesCmd); UICommand noCmd = new("No"); msgDialog.Commands.Add(noCmd); WinRT.Interop.InitializeWithWindow.Initialize(msgDialog, windowHandle); // Showing a dialog box. IUICommand cmd = await msgDialog.ShowAsync(); if (cmd.Label == yesCmd.Label) { // Launch the saved file. await Windows.System.Launcher.LaunchFileAsync(stFile); } } } } $vbLabelText $csharpLabel Build and run the MAUI application. A window will appear containing the interface shown below: The UI of the MAUI App Click on the "Generate PDF" button. After a few moments, a popup will appear to choose the location of the generated PDF file. Select a location to save the PDF file Conclusion IronPDF is one of the most commonly used PDF converter libraries that allows you to generate, read, edit, and format PDFs. The IronPDF library provides many benefits and functionalities, including a browser engine that will help to convert a given URL into a PDF file, allows you to add CSS to HTML strings and convert them to PDF files, and also allows you to fill out PDF forms. All of the features of IronPDF are included in one library. IronPDF comes with various price structures. The basic price for IronPDF starts at $799. Product support and updates are also available for a one-year fee. Royalty-free redistribution coverage can also be purchased as an add-on. To summarize, IronPDF is recommended since it offers great performance and a large number of features for developers working with PDFs. It supports universal platforms such as .NET MAUI. It also comes with excellent assistance and documentation, allowing you to fully utilize the wide range of the IronPDF library and its many features. 자주 묻는 질문 .NET MAUI 애플리케이션에서 PDF 파일을 생성하려면 어떻게 해야 하나요? .NET MAUI 앱에서 PDF 파일을 생성하려면 IronPDF를 사용할 수 있습니다. 먼저 Visual Studio에서 .NET MAUI 프로젝트를 설정하고, NuGet을 통해 IronPDF를 설치한 다음 ChromePdfRenderer.RenderHtmlAsPdf 메서드를 사용하여 HTML 콘텐츠를 PDF 문서로 변환합니다. .NET MAUI가 크로스 플랫폼 앱 개발에 적합한 이유는 무엇인가요? .NET MAUI는 개발자가 단일 코드 기반에서 Android, iOS, macOS 및 Windows용 C# 및 XAML을 사용하여 네이티브 모바일 및 데스크톱 앱을 만들 수 있으므로 크로스 플랫폼 앱 개발에 이상적입니다. IronPDF는 PDF 변환에서 HTML, CSS 및 JavaScript를 어떻게 처리하나요? IronPDF는 Google Chrome 엔진을 사용하여 HTML, CSS 및 JavaScript를 PDF 형식으로 정확하게 렌더링하여 웹 페이지가 서식을 잃지 않고 변환되도록 보장합니다. .NET MAUI 앱에서 다른 플랫폼에 PDF 파일을 저장하는 프로세스는 무엇인가요? IronPDF를 사용하는 .NET MAUI 앱에서 SaveService 클래스는 PDF 파일을 저장하는 데 사용됩니다. 여기에는 Windows 및 Android와 같은 운영 체제에서 파일 저장을 처리하기 위한 플랫폼별 구현이 포함되어 있습니다. .NET 애플리케이션용 IronPDF에서 사용할 수 있는 고급 기능에는 어떤 것이 있나요? IronPDF는 대화형 PDF 만들기, 양식 작성 및 제출, 문서 병합 및 분할, 텍스트 및 이미지 추출, 머리글, 바닥글 및 워터마크 추가와 같은 고급 기능을 제공합니다. IronPDF를 Visual Studio의 .NET MAUI 프로젝트에 통합하려면 어떻게 해야 하나요? IronPDF를 .NET MAUI 프로젝트에 통합하려면 Visual Studio의 NuGet 패키지 관리자를 사용하세요. 'IronPDF'를 검색하여 프로젝트에 설치하면 PDF 생성 및 관리를 시작할 수 있습니다. IronPDF는 .NET MAUI 앱에서 웹 페이지 URL을 PDF로 변환할 수 있나요? 예, IronPDF는 웹 렌더링 기능을 사용하여 HTML, CSS 및 JavaScript 콘텐츠를 정확하게 캡처하고 PDF 형식으로 렌더링하여 웹 페이지 URL을 PDF로 변환할 수 있습니다. .NET MAUI 앱용 UI를 디자인할 때 XAML의 역할은 무엇인가요? XAML은 .NET MAUI에서 앱의 사용자 인터페이스를 디자인하는 데 사용됩니다. 이를 통해 개발자는 여러 플랫폼에서 원활하게 작동하는 반응성이 뛰어나고 시각적으로 매력적인 레이아웃을 만들 수 있습니다. .NET MAUI 프로젝트에서 IronPDF를 사용하면 어떤 이점이 있나요? IronPDF는 사용 편의성, 광범위한 문서화, 성능, 다양한 PDF 작업 처리 기능 등의 이점을 제공하므로 .NET MAUI 프로젝트에서 PDF로 작업하는 개발자에게 신뢰할 수 있는 선택이 될 수 있습니다. IronPDF는 .NET 10과 완벽하게 호환되며 어떤 이점이 있나요? 예, IronPDF는 .NET 10과 완벽하게 호환되며 버전 9, 8, 7, 6, 코어, 표준 및 프레임워크와 함께 즉시 지원합니다. .NET 10과 함께 IronPDF를 사용하면 힙 할당 감소, JIT/런타임 동작 개선, 새로운 C# 언어 기능과 같은 성능 개선 사항을 활용하여 PDF 생성 및 조작을 더 빠르고 효율적으로 수행할 수 있습니다. 커티스 차우 지금 바로 엔지니어링 팀과 채팅하세요 기술 문서 작성자 커티스 차우는 칼턴 대학교에서 컴퓨터 과학 학사 학위를 취득했으며, Node.js, TypeScript, JavaScript, React를 전문으로 하는 프론트엔드 개발자입니다. 직관적이고 미적으로 뛰어난 사용자 인터페이스를 만드는 데 열정을 가진 그는 최신 프레임워크를 활용하고, 잘 구성되고 시각적으로 매력적인 매뉴얼을 제작하는 것을 즐깁니다. 커티스는 개발 분야 외에도 사물 인터넷(IoT)에 깊은 관심을 가지고 있으며, 하드웨어와 소프트웨어를 통합하는 혁신적인 방법을 연구합니다. 여가 시간에는 게임을 즐기거나 디스코드 봇을 만들면서 기술에 대한 애정과 창의성을 결합합니다. 관련 기사 업데이트됨 1월 22, 2026 How to Create PDF Documents in .NET with IronPDF: Complete Guide Discover effective methods to create PDF files in C# for developers. Enhance your coding skills and streamline your projects. Read the article now! 더 읽어보기 업데이트됨 1월 21, 2026 How to Merge PDF Files in VB.NET: Complete Tutorial Merge PDF VB NET with IronPDF. Learn to combine multiple PDF files into one document using simple VB.NET code. Step-by-step examples included. 더 읽어보기 업데이트됨 1월 21, 2026 C# PDFWriter Tutorial: Create PDF Documents in .NET Learn to create PDFs efficiently using C# PDFWriter with this step-by-step guide for developers. Read the article to enhance your skills today! 더 읽어보기 Create a PDF File with Blazor TutorialHow to Convert Image to PDF in C# [...
업데이트됨 1월 22, 2026 How to Create PDF Documents in .NET with IronPDF: Complete Guide Discover effective methods to create PDF files in C# for developers. Enhance your coding skills and streamline your projects. Read the article now! 더 읽어보기
업데이트됨 1월 21, 2026 How to Merge PDF Files in VB.NET: Complete Tutorial Merge PDF VB NET with IronPDF. Learn to combine multiple PDF files into one document using simple VB.NET code. Step-by-step examples included. 더 읽어보기
업데이트됨 1월 21, 2026 C# PDFWriter Tutorial: Create PDF Documents in .NET Learn to create PDFs efficiently using C# PDFWriter with this step-by-step guide for developers. Read the article to enhance your skills today! 더 읽어보기