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.
Unfortunately, activation email could not send to your email. Please try again.

Unable to get PDFViewer to work

Thread ID:

Created:

Updated:

Platform:

Replies:

130330 May 7,2017 10:33 AM May 9,2017 05:22 AM Xamarin.Forms 3
loading
Tags: PdfViewer
Michael Salzlechner
Asked On May 7, 2017 10:33 AM

I downloaded your sample for the PDFViewer and it works 

Then i cerated a new PCL project in Visual Studio 2017

I added the PDFViewer package to the portable project and also added it to the Android project

I then added the sample PDF file to the Assets folder in the portable project and marked it as embedded resource

I then added the PDF control per your documentation and added code to load it in OnAppearing as per your documentation

it looks like the stream is loading correctly but the PDF control is not loading the PDF file properly

attached is the project that does not work

thanks

Mike


Sathish Sivakumar [Syncfusion]
Replied On May 8, 2017 08:57 AM

Hi Michael, 
 
Thank you for using Syncfusion products. 
 
We are unable to reproduce the issue “PDF documents cannot be loaded properly in SfPdfViewer in Xamarin.Forms.Android” from our side. We have created a simple PCL project using Visual Studio 2017 with the details provided in your last update to load the PDF document in SfPdfViewer and it will be available in the below link: 
 
 
Kindly provide  the following details to investigate further: 
1.       PDF document you are used to load in SfPdfViewer 
2.       Simple sample or modify the above sample to reproduce the issue. 
3.       .NET Framework version 
4.       Essential Studio version 
5.       Android device and API details 
 
Regards, 
Sathish  


Michael Salzlechner
Replied On May 8, 2017 10:50 AM



the sample was attached to the post but you can get the full visual studio workspace from here


The above workspace was created with Visual Studio 2017 as follows


New Project
select Cross Platform App (Xamarin Forms)
select PCL 

Add PDFViewer nuget package to Portable and Android project

Add PDF file and mark as embedded resource
Add code to load PDF file



Sathish Sivakumar [Syncfusion]
Replied On May 9, 2017 05:22 AM

Hi Michael, 
 
Thank you for your update. 
 
On analyzing your sample we found that the native Xamarin.Android SfPdfViewer nuget package (Syncfusion.Xamarin.SfPdfViewer.Android) were referred in your Xamarin Forms Android (PdfViewer2.Android) PCL project. We would request you to kindly uninstall that nuget package and install the appropriate nuget package (Syncfusion.Xamarin.SfPdfViewer) as highlighted in the below screenshot to display PDF document correctly in SfPdfViewer in Xamarin.Forms.Android. 
 
 
 
Kindly revert us if you still facing the same problem. 
 
Regards, 
Sathish 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;