Skip to main content

DevExpress PDF Viewer for .NET MAUI

  • 2 minutes to read

Note

The DevExpress .NET MAUI PDF Viewer control requires a license to our Universal Subscription. Without a valid license, you cannot use this control within your .NET MAUI application.

The DevExpress PdfViewer component for .NET MAUI allows you to display PDF documents in your applications.

DevExpress PDF Viewer for .NET MAUI

Review our demo app on GitHub to try out the PdfViewer control:

View Example

PDF Viewer Elements (Anatomy)

The following figure shows basic elements of a PDF viewer:

DevExpress PDF viewer for .NET MAUI - Elements

Add a PDF Viewer to the Page

Before you proceed, read the following topic: Get Started with DevExpress Controls for .NET Multi-platform App UI (.NET MAUI).

The following example adds a PDF viewer to a page:

<ContentPage ...
             xmlns:dxpdf="clr-namespace:DevExpress.Maui.Pdf;assembly=DevExpress.Maui.Pdf">
        <dxpdf:PdfViewer x:Name="pdfViewer" />
</ContentPage>

The PdfViewer requires that you call the UseSkiaSharp() method to use the Skia graphics engine to render PDF document pages:

using DevExpress.Maui;
using SkiaSharp.Views.Maui.Controls.Hosting;

namespace DXMauiPdfViewer {
    public static class MauiProgram {
        public static MauiApp CreateMauiApp() {
            var builder = MauiApp.CreateBuilder();
            builder
                .UseMauiApp<App>()
                .UseDevExpress(useLocalization: true)
                .UseSkiaSharp()
                .ConfigureFonts(fonts => {
                    fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
                    fonts.AddFont("univia-pro-regular.ttf", "Univia-Pro");
                    fonts.AddFont("roboto-bold.ttf", "Roboto-Bold");
                    fonts.AddFont("roboto-regular.ttf", "Roboto");
                });
            return builder.Build();
        }
    }
}

DevExpress PDF Document API

The PDF Document API library offers several unique features you may find useful for your PDF Viewer app:

The following examples show how to use the PDF Document API library in your .NET MAUI App:

Populate E-Forms in a PDF File

Implements a view that opens a PDF File, obtains form fields, and allows you to populate them.

View Example

Sign PDF Files

Shows how to use Office File API to sign PDF files.

View Example

You need an active license for the DevExpress Office File API Subscription or DevExpress Universal Subscription to use these features in production code. For pricing information, refer to the following page: DevExpress Subscription Plans.

Next Steps

Load Document to PDF Viewer
This topic explains how to load PDF files to the PDF viewer control.
Page Navigation
This topic describes how to navigate through PDF file pages and content.
Commands
This topic lists PDF viewer commands you can use to implement custom toolbars.