푸터 콘텐츠로 바로가기
IRONPDF 사용

How to View PDF in .NET MAUI (Step-by-Step) Tutorial

.NET MAUI is the next generation of .NET that enables developers to build cross-platform Desktop, Web, and Mobile Apps, including Xamarin.Forms, with a single codebase. With .NET MAUI, you can write your app once and deploy it to multiple platforms, including Windows, macOS, iOS, Android, and tvOS with the same project name. .NET MAUI also enables you to take advantage of the latest UI capabilities on each platform, such as dark mode and touch support on macOS, or speech recognition on Windows 10.

This article will explain how to use IronPDF in the .NET MAUI app to create PDF documents with many benefits.


IronPDF: C# PDF Library

IronPDF is a .NET library that allows you to generate and edit PDF files. It's perfect for use in .NET MAUI applications, as it offers a wide range of features that can be customized to fit your specific needs. With its easy-to-use API, IronPDF makes it simple to integrate PDF functionality into your .NET MAUI project.

Prerequisites

There are some prerequisites for creating PDF and PDF Viewer in .NET MAUI using IronPDF:

  1. The latest version of Visual Studio
  2. .NET Framework 6 or 7
  3. MAUI packages installed in Visual Studio
  4. .NET MAUI Application running in Visual Studio

Step 1: Install IronPDF

One of the best ways to install IronPDF in a new project is by using the NuGet Package Manager Console within Visual Studio. There are some advantages to using this method to install IronPDF.

  • It's easy to do, and
  • You can be sure that you're using the latest version of IronPDF.

Steps to Install IronPDF

First, open the Package Manager Console by going to Tools > NuGet Package Manager > Package Manager Console.

How to View PDF in .NET MAUI (Step-by-Step) Tutorial, Figure 1: Package Manager Console Package Manager Console

Next, type in the following command:

Install-Package IronPdf

This will install the package and all its dependencies like the assets folder.

How to View PDF in .NET MAUI (Step-by-Step) Tutorial, Figure 2: IronPDF Installation IronPDF Installation

You can now start using IronPDF in your MAUI project.

Step 2: Setup Frontend Design in .NET MAUI

Firstly, create a layout for the three functionalities of IronPDF.

URL to PDF Layout

For the URL to PDF layout, create a label with the text "Enter URL to Convert PDF" using a .NET MAUI label control. After that, apply a horizontal stack layout for arranging the Entry control and the button horizontally. Then put a line after the controls to divide the next section of controls.

<Label
    Text="Enter URL to Convert PDF"
    SemanticProperties.HeadingLevel="Level1"
    FontSize="18"
    HorizontalOptions="Center" 
/>
<HorizontalStackLayout
    HorizontalOptions="Center">
    <Border Stroke="White"
            StrokeThickness="2"
            StrokeShape="RoundRectangle 5,5,5,5"
            HorizontalOptions="Center">
        <Entry
            x:Name="URL"
            HeightRequest="50"
            WidthRequest="300" 
            HorizontalOptions="Center"
        />
    </Border>

    <Button
        x:Name="urlPDF"
        Text="Convert URL to PDF"
        Margin="30,0,0,0"
        Clicked="UrlToPdf"
        HorizontalOptions="Center" />
</HorizontalStackLayout>

<Line Stroke="White" X2="1500" />
<Label
    Text="Enter URL to Convert PDF"
    SemanticProperties.HeadingLevel="Level1"
    FontSize="18"
    HorizontalOptions="Center" 
/>
<HorizontalStackLayout
    HorizontalOptions="Center">
    <Border Stroke="White"
            StrokeThickness="2"
            StrokeShape="RoundRectangle 5,5,5,5"
            HorizontalOptions="Center">
        <Entry
            x:Name="URL"
            HeightRequest="50"
            WidthRequest="300" 
            HorizontalOptions="Center"
        />
    </Border>

    <Button
        x:Name="urlPDF"
        Text="Convert URL to PDF"
        Margin="30,0,0,0"
        Clicked="UrlToPdf"
        HorizontalOptions="Center" />
</HorizontalStackLayout>

<Line Stroke="White" X2="1500" />
XML

HTML to PDF Layout

For the layout of the HTML to PDF section, create an Editor control and a button. The Editor control will be used for accepting a string of HTML content from the user. Additionally, add a line as a divider.

<Label
    Text="Enter HTML to Convert to PDF"
    SemanticProperties.HeadingLevel="Level2"
    FontSize="18"
    HorizontalOptions="Center" />
<Border 
    Stroke="White"
    StrokeThickness="2"
    StrokeShape="RoundRectangle 5,5,5,5"
    HorizontalOptions="Center">

    <Editor
        x:Name="HTML"
        HeightRequest="200"
        WidthRequest="300" 
        HorizontalOptions="Center"
    />

</Border>

<Button
    x:Name="htmlPDF"
    Text="Convert HTML to PDF"
    Clicked="HtmlToPdf"
    HorizontalOptions="Center" />

<Line Stroke="White" X2="1500" />
<Label
    Text="Enter HTML to Convert to PDF"
    SemanticProperties.HeadingLevel="Level2"
    FontSize="18"
    HorizontalOptions="Center" />
<Border 
    Stroke="White"
    StrokeThickness="2"
    StrokeShape="RoundRectangle 5,5,5,5"
    HorizontalOptions="Center">

    <Editor
        x:Name="HTML"
        HeightRequest="200"
        WidthRequest="300" 
        HorizontalOptions="Center"
    />

</Border>

<Button
    x:Name="htmlPDF"
    Text="Convert HTML to PDF"
    Clicked="HtmlToPdf"
    HorizontalOptions="Center" />

<Line Stroke="White" X2="1500" />
XML

HTML File to PDF Layout

For the HTML files to PDF, add only one button. That button will help to convert an HTML file to a PDF document using IronPDF.

<Label
    Text="Convert HTML file to PDF"
    SemanticProperties.HeadingLevel="Level2"
    FontSize="18"
    HorizontalOptions="Center" />

<Button
    x:Name="htmlFilePDF"
    Text="Convert HTML file to PDF"
    Clicked="FileToPdf"
    HorizontalOptions="Center" />
<Label
    Text="Convert HTML file to PDF"
    SemanticProperties.HeadingLevel="Level2"
    FontSize="18"
    HorizontalOptions="Center" />

<Button
    x:Name="htmlFilePDF"
    Text="Convert HTML file to PDF"
    Clicked="FileToPdf"
    HorizontalOptions="Center" />
XML

The Complete UI Code

The full source code for the .NET MAUI front end is given 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="PDF_Viewer.MainPage">

    <ScrollView>
        <VerticalStackLayout
            Spacing="25"
            Padding="30,0"
            VerticalOptions="Center">
            <Label
                Text="Enter URL to Convert PDF"
                SemanticProperties.HeadingLevel="Level1"
                FontSize="18"
                HorizontalOptions="Center" 
            />
            <HorizontalStackLayout
                HorizontalOptions="Center">
                <Border Stroke="White"
                        StrokeThickness="2"
                        StrokeShape="RoundRectangle 5,5,5,5"
                        HorizontalOptions="Center">
                    <Entry
                        x:Name="URL"
                        HeightRequest="50"
                        WidthRequest="300" 
                        HorizontalOptions="Center"
                    />
                </Border>

                <Button
                    x:Name="urlPDF"
                    Text="Convert URL to PDF"
                    Margin="30,0,0,0"
                    Clicked="UrlToPdf"
                    HorizontalOptions="Center" />
            </HorizontalStackLayout>

            <Line Stroke="White" X2="1500" />

            <Label
                Text="Enter HTML to Convert to PDF"
                SemanticProperties.HeadingLevel="Level2"
                FontSize="18"
                HorizontalOptions="Center" />
            <Border 
                Stroke="White"
                StrokeThickness="2"
                StrokeShape="RoundRectangle 5,5,5,5"
                HorizontalOptions="Center">

                <Editor
                    x:Name="HTML"
                    HeightRequest="200"
                    WidthRequest="300" 
                    HorizontalOptions="Center"
                />

            </Border>

            <Button
                x:Name="htmlPDF"
                Text="Convert HTML to PDF"
                Clicked="HtmlToPdf"
                HorizontalOptions="Center" />

            <Line Stroke="White" X2="1500" />

            <Label
                Text="Convert HTML file to PDF"
                SemanticProperties.HeadingLevel="Level2"
                FontSize="18"
                HorizontalOptions="Center" />

            <Button
                x:Name="htmlFilePDF"
                Text="Convert HTML file to PDF"
                Clicked="FileToPdf"
                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="PDF_Viewer.MainPage">

    <ScrollView>
        <VerticalStackLayout
            Spacing="25"
            Padding="30,0"
            VerticalOptions="Center">
            <Label
                Text="Enter URL to Convert PDF"
                SemanticProperties.HeadingLevel="Level1"
                FontSize="18"
                HorizontalOptions="Center" 
            />
            <HorizontalStackLayout
                HorizontalOptions="Center">
                <Border Stroke="White"
                        StrokeThickness="2"
                        StrokeShape="RoundRectangle 5,5,5,5"
                        HorizontalOptions="Center">
                    <Entry
                        x:Name="URL"
                        HeightRequest="50"
                        WidthRequest="300" 
                        HorizontalOptions="Center"
                    />
                </Border>

                <Button
                    x:Name="urlPDF"
                    Text="Convert URL to PDF"
                    Margin="30,0,0,0"
                    Clicked="UrlToPdf"
                    HorizontalOptions="Center" />
            </HorizontalStackLayout>

            <Line Stroke="White" X2="1500" />

            <Label
                Text="Enter HTML to Convert to PDF"
                SemanticProperties.HeadingLevel="Level2"
                FontSize="18"
                HorizontalOptions="Center" />
            <Border 
                Stroke="White"
                StrokeThickness="2"
                StrokeShape="RoundRectangle 5,5,5,5"
                HorizontalOptions="Center">

                <Editor
                    x:Name="HTML"
                    HeightRequest="200"
                    WidthRequest="300" 
                    HorizontalOptions="Center"
                />

            </Border>

            <Button
                x:Name="htmlPDF"
                Text="Convert HTML to PDF"
                Clicked="HtmlToPdf"
                HorizontalOptions="Center" />

            <Line Stroke="White" X2="1500" />

            <Label
                Text="Convert HTML file to PDF"
                SemanticProperties.HeadingLevel="Level2"
                FontSize="18"
                HorizontalOptions="Center" />

            <Button
                x:Name="htmlFilePDF"
                Text="Convert HTML file to PDF"
                Clicked="FileToPdf"
                HorizontalOptions="Center" />
        </VerticalStackLayout>
    </ScrollView>

</ContentPage>
XML

Step 3: Code for Save and View PDF file

.NET MAUI doesn't have any pre-built function to save files in local storage. So, it is necessary to write the code ourselves. For creating the save and view functionality, a partial class named SaveService is created with a partial void function named SaveAndView with three parameters: the file name, file content type, and memory stream to write the file.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PDF_Viewer
{
    public partial class SaveService
    {
        public partial void SaveAndView(string filename, string contentType, MemoryStream stream);
    }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PDF_Viewer
{
    public partial class SaveService
    {
        public partial void SaveAndView(string filename, string contentType, MemoryStream stream);
    }
}
$vbLabelText   $csharpLabel

Saving and viewing functionality will need to be implemented for each platform that intends to support (e.g., for Android, macOS, and/or Windows). For the Windows platform, create a file named "SaveWindows.cs" and implement the partial method SaveAndView:

using Windows.Storage;
using Windows.Storage.Pickers;
using Windows.Storage.Streams;
using Windows.UI.Popups;

namespace PDF_Viewer
{
    public partial class SaveService
    {
        public async partial void SaveAndView(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 FileSavePicker();
                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 PDF_Viewer
{
    public partial class SaveService
    {
        public async partial void SaveAndView(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 FileSavePicker();
                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

For Android and macOS, you've to create separate files with comparable SaveAndView implementations. You can get a working example from this MAUI PDF Viewer GitHub Repo.

Step 4: Code for PDF Functionalities

Now, it's time to write the code for the PDF functionalities. Let's start with the URL to PDF functionality.

URL to PDF Functionality

Create an UrlToPdf function for the URL to PDF functionality. Inside the function, instantiate the ChromePdfRenderer object and use the RenderUrlAsPdf function to convert the URL to PDF documents. The RenderUrlAsPdf function gets the data of the URL from the web server and processes it to convert it into a PDF document. In parameters, pass the text in the URL entry control, create an object of the SaveService class, and use the SaveAndView function. In the parameters of the SaveAndView function, pass in the stream of the generated PDF file.

The SaveAndView function helps to save files at any customized path and gives the option to view PDF files. At last, display an alert box with information about creating the PDF file. If a user tries to create a PDF file with an empty entry control, it'll display an alert box with an error message and warning.

private void UrlToPdf(object sender, EventArgs e)
{
    if (!string.IsNullOrEmpty(URL.Text))
    {
        var renderer = new IronPdf.ChromePdfRenderer();
        var pdf = renderer.RenderUrlAsPdf(URL.Text.Trim());
        SaveService saveService = new SaveService();
        saveService.SaveAndView("URLtoPDF.pdf", "application/pdf", pdf.Stream);
        DisplayAlert("Success", "PDF from URL Created!", "OK");
    }
    else
    {
        DisplayAlert("Error", "Field can't be empty! \nPlease enter URL!", "OK");
    }

}
private void UrlToPdf(object sender, EventArgs e)
{
    if (!string.IsNullOrEmpty(URL.Text))
    {
        var renderer = new IronPdf.ChromePdfRenderer();
        var pdf = renderer.RenderUrlAsPdf(URL.Text.Trim());
        SaveService saveService = new SaveService();
        saveService.SaveAndView("URLtoPDF.pdf", "application/pdf", pdf.Stream);
        DisplayAlert("Success", "PDF from URL Created!", "OK");
    }
    else
    {
        DisplayAlert("Error", "Field can't be empty! \nPlease enter URL!", "OK");
    }

}
$vbLabelText   $csharpLabel

HTML to PDF Functionality

For converting HTML to PDF functionality, create the HtmlToPdf function and use the RenderHtmlAsPdf function. Use the text of the Editor control and pass it in the parameters of the RenderHtmlAsPdf function. Similar to the above function, use the SaveAndView function to enable the functionality to view the PDF file after saving.

private void HtmlToPdf(object sender, EventArgs e)
{
    if (!string.IsNullOrEmpty(HTML.Text))
    {
        var renderer = new IronPdf.ChromePdfRenderer();
        var pdf = renderer.RenderHtmlAsPdf(HTML.Text);
        SaveService saveService = new SaveService();
        saveService.SaveAndView("IronPDF HTML string.pdf", "application/pdf", pdf.Stream);
        DisplayAlert("Success", "PDF from HTML Created!", "OK");
    }
    else
    {
        DisplayAlert("Error", "Field can't be empty! \nPlease enter valid HTML!", "OK");
    }
}
private void HtmlToPdf(object sender, EventArgs e)
{
    if (!string.IsNullOrEmpty(HTML.Text))
    {
        var renderer = new IronPdf.ChromePdfRenderer();
        var pdf = renderer.RenderHtmlAsPdf(HTML.Text);
        SaveService saveService = new SaveService();
        saveService.SaveAndView("IronPDF HTML string.pdf", "application/pdf", pdf.Stream);
        DisplayAlert("Success", "PDF from HTML Created!", "OK");
    }
    else
    {
        DisplayAlert("Error", "Field can't be empty! \nPlease enter valid HTML!", "OK");
    }
}
$vbLabelText   $csharpLabel

HTML File to PDF Functionality

Create the FileToPdf function for converting HTML files to PDF files. Use the RenderHtmlFileAsPdf function and pass the HTML file path as a parameter. It converts all HTML content into a PDF and saves the output file.

private void FileToPdf(object sender, EventArgs e)
{
    var renderer = new IronPdf.ChromePdfRenderer();
    var pdf = renderer.RenderHtmlFileAsPdf(@"C:\Users\Administrator\Desktop\index.html");
    SaveService saveService = new SaveService();
    saveService.SaveAndView("HTML File to PDF.pdf", "application/pdf", pdf.Stream);
    DisplayAlert("Success", "PDF from File Created!", "OK");
}
private void FileToPdf(object sender, EventArgs e)
{
    var renderer = new IronPdf.ChromePdfRenderer();
    var pdf = renderer.RenderHtmlFileAsPdf(@"C:\Users\Administrator\Desktop\index.html");
    SaveService saveService = new SaveService();
    saveService.SaveAndView("HTML File to PDF.pdf", "application/pdf", pdf.Stream);
    DisplayAlert("Success", "PDF from File Created!", "OK");
}
$vbLabelText   $csharpLabel

Output

After running the project, the output will look like this.

How to View PDF in .NET MAUI (Step-by-Step) Tutorial, Figure 3: Output Output

Put the Microsoft website URL in this section and click on the button.

How to View PDF in .NET MAUI (Step-by-Step) Tutorial, Figure 4: URL to PDF URL to PDF

After creating the PDF file, it shows a dialog box to save the file on the customized destination.

How to View PDF in .NET MAUI (Step-by-Step) Tutorial, Figure 5: Save File Save File

After saving the file, this popup shows and gives the option to select a PDF viewer to see the PDF file.

How to View PDF in .NET MAUI (Step-by-Step) Tutorial, Figure 6: PDF Viewer Popup PDF Viewer Popup

IronPDF converts the URL to PDF outstandingly. It preserves all colors and images in their original shape and formatting.

How to View PDF in .NET MAUI (Step-by-Step) Tutorial, Figure 7: PDF Viewer Popup PDF Viewer Popup

The same procedure needs to be followed with all other functionalities. Check out this IronPDF in Blazor Blog Post to learn more about IronPDF's working in Blazor.

Learn how to convert a MAUI page as XAML to a PDF document by visiting "How to Convert XAML to PDF in MAUI".

Summary

This tutorial used IronPDF in the .NET MAUI app to create a PDF file and PDF viewer. The .NET MAUI is a great tool to create multi-platform applications with a single codebase. IronPDF helps to create and customize PDF files easily in any .NET application. IronPDF is fully compatible with the .NET MAUI platform.

IronPDF is free for development. You can get a free trial key to test IronPDF in production. For more information about IronPDF and its capabilities, please visit the IronPDF Official Website.

자주 묻는 질문

.NET MAUI 애플리케이션에 PDF 뷰어를 통합하려면 어떻게 해야 하나요?

.NET MAUI 애플리케이션에 PDF 뷰어를 통합하려면 IronPDF를 사용하여 PDF 파일의 렌더링 및 보기를 처리할 수 있습니다. IronPDF를 사용하면 URL, HTML 문자열 및 HTML 파일에서 PDF를 렌더링한 다음 .NET MAUI 내의 다양한 PDF 뷰어 도구를 사용하여 저장 및 표시할 수 있습니다.

.NET MAUI용 IronPDF 설정에는 어떤 단계가 포함되나요?

.NET MAUI용 IronPDF 설정에는 Visual Studio의 NuGet 패키지 관리자를 통해 IronPDF 패키지를 설치하고, PDF 렌더링을 처리하도록 프로젝트를 구성하고, IronPDF의 메서드를 사용하여 HTML, URL 또는 HTML 파일을 PDF 문서로 변환하는 작업이 포함됩니다.

.NET MAUI에서 PDF 레이아웃이 유지되도록 하려면 어떻게 해야 하나요?

IronPDF는 .NET MAUI 애플리케이션에서 PDF 레이아웃을 보존할 수 있는 강력한 기능을 제공합니다. RenderHtmlAsPdf 또는 RenderUrlAsPdf와 같은 메서드를 사용하면 원래 서식과 레이아웃을 유지하면서 콘텐츠를 PDF로 변환할 수 있습니다.

.NET MAUI에서 PDF를 볼 때 흔히 발생하는 문제는 무엇이며 어떻게 해결할 수 있나요?

.NET MAUI에서 PDF를 볼 때 흔히 발생하는 문제로는 플랫폼별 렌더링 오류와 파일 액세스 권한이 있습니다. 이러한 문제는 IronPDF의 크로스 플랫폼 기능을 사용하고 앱의 코드베이스에서 파일 권한을 적절히 처리하여 해결할 수 있습니다.

.NET MAUI 애플리케이션에서 HTML 콘텐츠를 PDF로 변환할 수 있나요?

예, IronPDF의 RenderHtmlAsPdf 메서드를 사용하여 .NET MAUI 애플리케이션에서 HTML 콘텐츠를 PDF로 변환할 수 있습니다. 이를 통해 HTML 문자열을 완전한 형식의 PDF 문서로 효율적으로 변환할 수 있습니다.

.NET MAUI에서 파일 저장 및 보기를 어떻게 처리하나요?

.NET MAUI에서는 IronPDF를 사용하여 PDF 파일을 생성한 다음 플랫폼별 파일 처리 API를 사용하여 파일 저장 및 보기를 구현할 수 있습니다. IronPDF는 PDF 파일을 로컬 저장소에 저장한 다음 PDF 뷰어로 열 수 있는 기능을 지원합니다.

IronPDF는 모든 대상 .NET MAUI 플랫폼과 호환되나요?

예, IronPDF는 Windows, macOS, iOS, Android 및 tvOS를 포함하여 .NET MAUI가 대상으로 하는 모든 플랫폼과 호환되므로 이러한 시스템에서 원활한 PDF 작성 및 보기 환경을 제공합니다.

전체 배포 전에 .NET MAUI 프로젝트에서 IronPDF를 테스트하려면 어떻게 해야 하나요?

무료 개발 라이선스를 사용하여 .NET MAUI 프로젝트에서 IronPDF를 테스트할 수 있습니다. 이를 통해 정식 프로덕션 라이선스를 구매하기 전에 애플리케이션에서 PDF 기능을 통합하고 테스트할 수 있습니다.

IronPDF는 .NET 10을 지원하며 어떤 이점이 있나요?

예, IronPDF는 .NET 10을 완벽하게 지원합니다. MAUI, 웹, 데스크톱 및 클라우드 기반 앱을 포함하여 .NET 10으로 앱을 빌드할 때 사용자 지정 해결 방법 없이 바로 작동합니다. .NET 10을 사용하면 최신 플랫폼 개선 사항, 성능 향상 및 업데이트된 API에 액세스할 수 있습니다.

커티스 차우
기술 문서 작성자

커티스 차우는 칼턴 대학교에서 컴퓨터 과학 학사 학위를 취득했으며, Node.js, TypeScript, JavaScript, React를 전문으로 하는 프론트엔드 개발자입니다. 직관적이고 미적으로 뛰어난 사용자 인터페이스를 만드는 데 열정을 가진 그는 최신 프레임워크를 활용하고, 잘 구성되고 시각적으로 매력적인 매뉴얼을 제작하는 것을 즐깁니다.

커티스는 개발 분야 외에도 사물 인터넷(IoT)에 깊은 관심을 가지고 있으며, 하드웨어와 소프트웨어를 통합하는 혁신적인 방법을 연구합니다. 여가 시간에는 게임을 즐기거나 디스코드 봇을 만들면서 기술에 대한 애정과 창의성을 결합합니다.