We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

PDF Viewer in Blazor Hybrid App

I am looking to add a PDF editor to a windows application.  Your WinUI suite does not include any PDF Viewer control and the MAUI suite does not support editing (specifically ink annotation). I am left with 3 choices that I can think of:

1 - Write the application in UWP and update it to WinUI when you make the PDF Viewer control available.

2 - Write the application in WinUI and use the more limited WebView2 control to view and edit a PDF.

3 - Write the application in WinForms, WPF or MAUI and use the BlazorWebView control to host the Blazor version of your PDF Viewer.

Since I only plan to launch this on Windows even if I develop it in MAUI, can I follow the guidance for using it in a Server app (For Windows, use Syncfusion.Blazor.PdfViewerServer.Windows and Syncfusion.Blazor.Themes) to make it work?


8 Replies

SK Scott Kuhl January 2, 2023 06:24 PM UTC

I was able to make this work in WinForms and WPF but not MAUI.

The MAUI application fails on build after adding the PdfViewServer package with the following error:

Error APPX1101 Payload contains two or more files with the same destination path 'x86\pdfium.dll'. Source files:


C:\Users\scott\.nuget\packages\syncfusion.pdfviewer.aspnet.core.windows\\libetstandard2.0\Pdfium(x86)\pdfium.dll MauiPdf C:\Users\scott\.nuget\packages\microsoft.windowsappsdk\1.2.221109.1\buildTransitive\Microsoft.Build.Msix.Packaging.targets 1504

I have tried commenting out support for all platforms except Windows, setup configuration for just x64 and set the Platform support to only x64 but I still get the error.  

Attachment: MauiPdf_9523e9cb.zip

SK Scott Kuhl January 2, 2023 09:33 PM UTC

I have opened a bug for the APPX specific issue (427696)

VV Visvesvar Venkatesan Syncfusion Team January 4, 2023 03:20 AM UTC

We are analyzing and validating the reported issue and we will update further details regarding this on January 5, 2023.

VV Visvesvar Venkatesan Syncfusion Team January 5, 2023 04:49 PM UTC

We were able to reproduce the reported issue  “PDF Viewer fails to compile in .NET MAUI Blazor App" and suspect this to be a defect. We will validate it and update further details in two business days on January 09, 2023.

VV Visvesvar Venkatesan Syncfusion Team January 11, 2023 04:50 AM UTC

We have confirmed the issue "PDF Viewer fails to compile in .NET MAUI Blazor App" and logged it as a defect. The fix for the issue will be available in our upcoming weekly NuGet release on January 25, 2023. You can track the status of the issue through the following link.

Feedback link: PDF Viewer fails to compile in .NET MAUI Blazor App | Issue Feedback

Disclaimer: "Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization."

VV Visvesvar Venkatesan Syncfusion Team January 25, 2023 03:22 PM UTC

We have fixed the reported issue "PDF Viewer fails to compile in .NET MAUI Blazor App" and the fix for the reported issue was included in our latest weekly release v20.4.0.44. Kindly upgrade to that version to get the issue resolved.




CDN Links:



CCM Karthik

SK Scott Kuhl January 25, 2023 05:03 PM UTC

This has resolved the build issue but introduced a new build warning:

 warning MSB3277: Found conflicts between different versions of "WindowsBase" that could not be resolved.

 warning MSB3277: There was a conflict between "WindowsBase, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "WindowsBase, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35".

warning MSB3277: "WindowsBase, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was chosen because it was primary and "WindowsBase, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was not.

Project file item includes which caused reference "C:\Users\scott\.nuget\packages\syncfusion.licensing\\lib\net7.0-windows7.0\Syncfusion.Licensing.dll".

I tried adding a reference to the Licensing NuGet package directly, but it did not help.

VV Visvesvar Venkatesan Syncfusion Team January 26, 2023 01:04 PM UTC

We have created a ticket in your name for the latest reported issue. Kindly follow that ticket for a further update regarding the latest reported issue. 

We hope that the initially reported issue is resolved.

Live Chat Icon For mobile
Up arrow icon