IRONSOFTWAREHOME
XAML to PDF (MAUI)

// PM > Install-Package IronPdf.Extensions.Maui

ChromePdfRenderer renderer = new ChromePdfRenderer();

// Apply HTML header
renderer.RenderingOptions.HtmlHeader = new HtmlHeaderFooter()
{
    HtmlFragment = "<h1>Header</h1>",
};

// Render PDF from Maui Page
PdfDocument pdf = renderer.RenderContentPageToPdf<MainPage, App>().Result;

pdf.SaveAs(@"C:\contentPageToPdf.pdf");
' PM > Install-Package IronPdf.Extensions.Maui

Dim renderer As New ChromePdfRenderer()

' Apply HTML header
renderer.RenderingOptions.HtmlHeader = New HtmlHeaderFooter() With {
    .HtmlFragment = "<h1>Header</h1>"
}

' Render PDF from Maui Page
Dim pdf As PdfDocument = renderer.RenderContentPageToPdf(Of MainPage, App)().Result

pdf.SaveAs("C:\contentPageToPdf.pdf")
NuGet Download
PM > Install-Package IronPdf
XAML to PDF (MAUI)

XAML to PDF (MAUI)

This example demonstrates how a MAUI page can be converted into a PDF document.

The IronPdf.Extensions.Maui package is an extension of the main IronPdf package. Both the IronPdf.Extensions.Maui and IronPdf packages are needed to render a content page from a MAUI application to a PDF document.

Rendering from a MAUI page will give you access to all the features offered by the RenderingOptions class. The resulting PDF document can then either be exported as a PDF file or viewed with a MAUI PDF viewer.

Below is a sample code demonstrating the conversion process:

  • ChromePdfRenderer: This class is responsible for converting web content to PDF format using the Chrome rendering engine.
  • RenderingOptions: This property allows customization of the PDF document, such as headers and footers, page size, margins, etc.
  • RenderContentPageToPdf: This is a method from the IronPdf.Extensions.Maui package that facilitates rendering a MAUI ContentPage to a PDF document.
  • SaveAs: This method saves the generated PDF document to a specified file path.
Learn to Convert XAML to PDF in MAUI with IronPDF
View on GitHub

Ready to Get Started?

Nuget Downloads 21,105,021Version:2026.9just released

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

OR
bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried Iron Suite
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package IronPdf
nuget.org/packages/IronPdf/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronPdf"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

or download Windows Installer here.

  1. Download and unzip IronPDF to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronPdf.dll"

Licenses from $999