The sample app does not work out of the box.

I am trying to incorporate the SF PDFViewer in our app. So, I downloaded the Xamarin-Demos-master and am focusing on SampleBrowser.SfPdfViewer.sln.

Out og the box:

Android version gave me 10 errors.

iOS version gave 25 errors.

UWP version gave 225 errors.


It is the expectation that sample programs are tested and working so that they can be used for learning from. I don't have time to try and debug someone else's code.


I noticed that the nuget had been changed 12 days ago. So I was optimistic that the code would have the latest and greatest SF code and XF code. But the Xamarin Forms nuget was V4.5.0.617 and the current Xamarin Forms version is 5.0.0.2244.

What settings do I need for running the UWP version of this app so that I can evaluate it.

Is is possible to get a stand-a-lone version that does not depend on:

using SampleBrowser.Core;


Thanks


3 Replies

SP SarathKumar Prakash Syncfusion Team November 25, 2021 12:05 PM UTC

Hi Will Autio, 
 
We have checked your issue and found solution for that.Below solution will help you to resolve your issue. 
In UWP property settings: 
1.change target version to Windows 10, version 1903(10.0;Build 18362) and 
min version to Windows 10, version 1903(10.0;Build 18362) 
 
2.After that you have to change SolidColorBrush to Windows.UI.Xaml.Media.SolidColorBrush in CustomStampEffectUWP class as shown in below picture.  
 
Please find the workable sample browser sample for all the platform form below link, 
 
Regards, 
Sarath Kumar. 



WA Will Autio November 25, 2021 05:29 PM UTC

@ SarathKumar Prakash

Thanks for your reply. I appreciate the revised sample code and it has the changes that you suggested.

I first ran the sample with the following settings which resulted in the error below:

Debug   Any CPU   SampleBrowser.SfPdfViewer.UWP    Local machine

Error The BaseOutputPath/OutputPath property is not set for project 'SampleBrowser.SfPdfViewer.UWP.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='AnyCPU'. This error may also appear if some other project is trying to follow a project-to-project reference to this project, this project has been unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform. SampleBrowser.SfPdfViewer.UWP


I then changed the settings  and got more errors:

Debug   x64   SampleBrowser.SfPdfViewer.UWP    Local machine

Severity Code Description Project File Line Suppression State

Error Payload file 'C:\Users\Will\source\repos\2111\Resources\Image\Icons\Approved.png' does not exist. 

Error Payload file 'C:\Users\Will\source\repos\2111\Resources\Image\Icons\Draft.png' does not exist. 

Error Payload file 'C:\Users\Will\source\repos\2111\Resources\Image\Icons\Confidential.png' does not exist. 

Error Payload file 'C:\Users\Will\source\repos\2111\Resources\Image\Icons\NotApproved.png' does not exist. 

Error Payload file 'C:\Users\Will\source\repos\2111\Resources\Image\Icons\Expired.png' does not exist. 


After investigating these errors, I determined that if I replaced the PDFViewer folder in xamarin-demos-master, then it might work (because the csproj file was referencing images that were somewhere else in that set of files).


Filled with hope, I ran the app again for UWP. It ran successfully, but the results for Custom Toolbar were incorrect (see the attached image to compare Android and UWP). The buttons on the Toolbar were either missing or spanned the total length of the PDF or both. 


This is something that I pointed out to SF months ago and with all the PDF changes recently I really had hoped that it would be fixed by now.


Regards,

Will



Attachment: PDFViewrIssues_3e52ce42.zip


SP SarathKumar Prakash Syncfusion Team November 26, 2021 10:02 AM UTC

Hi Will Autio,

The issue, “Buttons are hided in toolbar” is not a bug with SfPdfViewer control. We confirmed that the issue has occurred in the Xamrin.Forms latest versions only. So kindly downgrade to the Xamarin.Forms version(v 4.5.0.617) to get the issue resolved as of now. However, we have created a bug report in Xamarin forms portal and we will let you know once they provide a proper solution to this issue.
Please find the bug report which we have created in Xamarin Forms portal,
Regards,
Sarath Kumar.



Loader.
Up arrow icon