- Home
- Forum
- Xamarin.Forms
- Unable to get PDFViewer to work
Unable to get PDFViewer to work
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
SIGN IN To post a reply.
3 Replies
SS
Sathish Sivakumar
Syncfusion Team
May 8, 2017 12:57 PM UTC
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
MS
Michael Salzlechner
May 8, 2017 02:50 PM UTC
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
SS
Sathish Sivakumar
Syncfusion Team
May 9, 2017 09:22 AM UTC
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
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
MS Michael Salzlechner
- May 7, 2017 02:33 PM UTC
- May 9, 2017 09:22 AM UTC