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?
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\126.96.36.199\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.
I have opened a bug for the APPX specific issue (427696)
We are analyzing and validating the reported issue and we will update further details regarding this on January 5, 2023.
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.
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.
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."
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 v188.8.131.52. Kindly upgrade to that version to get the issue resolved.
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=184.108.40.206, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "WindowsBase, Version=220.127.116.11, Culture=neutral, PublicKeyToken=31bf3856ad364e35".
warning MSB3277: "WindowsBase, Version=18.104.22.168, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was chosen because it was primary and "WindowsBase, Version=22.214.171.124, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was not.
Project file item includes which caused reference "C:\Users\scott\.nuget\packages\syncfusion.licensing\126.96.36.199\libet7.0-windows7.0\Syncfusion.Licensing.dll".
I tried adding a reference to the Licensing NuGet package directly, but it did not help.
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.