Choosing Your .NET MAUI Document Strategy
.NET MAUI is a new cross-platform framework from Microsoft aimed at creating mobile and desktop applications from a single codebase. The technology promises the ability to run a single application on four different operating systems: Windows, macOS, iOS, and Android.
In this blog post, we’ll explore several different options for adding PDF document viewing and editing capabilities to your new MAUI projects by leveraging PSPDFKit SDKs.
.NET MAUI XML
Native MAUI UIs are built using XAML, Microsoft’s declarative UI language of choice. If you’d prefer to build a PDF viewing experience using MAUI controls directly, you can leverage the GdPicture.NET SDK. The GdPicture.NET SDK comes with dedicated MAUI interfaces and a source-available example to get you started. With this approach, you’ll be able to fully tailor the UI to your exact needs and build out a wide variety of PDF viewing and manipulation use cases leveraging GdPicture.NET’s advanced APIs.
Alternatively, you can try our PSPDFKit for MAUI SDK and take advantage of the responsive UI built into the SDK, allowing you to focus on other parts of your app. To see it in action, check out our MAUI SDK example Catalog app.
.NET MAUI Blazor Hybrid
The easiest way to add a full PDF document viewing and editing experience to your MAUI applications is to leverage the PSPDFKit for Web SDK. PSPDFKit for Web is a React web application that utilizes WebAssembly for efficient document rendering and processing. The SDK can be integrated into a MAUI application using Blazor through the BlazorWebView
component, or via the more lightweight WebView. With this approach, PSPDFKit for Web is able to run completely locally on device on all platforms supported by MAUI. Due to its responsive design, it can easily adapt to different screen sizes — including small mobile screens.
You can build your entire application using web technologies, or mix and match with native MAUI user interfaces (UIs). In the latter case, the SDK can easily be controlled and configured from .NET by bridging calls to JavaScript.
To learn more about this approach, please check out How to Build a .NET MAUI PDF Viewer with the PSPDFKit SDK.
Our MAUI SDK is now live, offering seamless integration and enhanced features. With PSPDFKit for MAUI, you can easily integrate our viewer using XAML. If you’re still interested in integrating the Web SDK on your own with the Blazor hybrid approach outlined in this guide, let us know.
Upgrading from Xamarin
In essence, MAUI is an evolution of Xamarin, specifically Xamarin.Forms. For mobile projects, this opens up another integration option. You can opt to use PSPDFKit’s Xamarin C# bindings for iOS and Android, which were upgraded to support MAUI and give you access to the full UI and API capabilities of PSPDFKit for iOS and PSPDFKit for Android. This is the best option to achieve a fully native UI experience on mobile.
Conclusion
In summary, if you’re looking to add PDF document viewing and editing capabilities to your new .NET MAUI projects, you have several options to choose from among PSPDFKit SDKs. You can opt for web technologies to get a fully featured viewer, use native controls to build your own viewing UI, or leverage Xamarin C# bindings for the best mobile experience. In any case, you can count on PSPDFKit SDKs to kickstart the job for you.
Matej is a software engineering leader from Slovenia. He began his career freelancing and contributing to open source software. Later, he joined Nutrient, where he played a key role in creating its initial products and teams, eventually taking over as the company’s Chief Technology Officer. Outside of work, Matej enjoys playing tennis, skiing, and traveling.