This is a migrated thread and some comments may be shown as answers.

Android: PDF Viewer is broken when rotating device

4 Answers 158 Views
PdfViewer
This is a migrated thread and some comments may be shown as answers.
tristan
Top achievements
Rank 1
tristan asked on 19 Apr 2019, 06:45 AM

Hi,

I have a Xamarin Forms project, with Telerik PDF Viewer.

I simply added a PDF Viewer on a page, for testing it:

- opening a PDF with an URL

- Opening a PDF with Stream as Embedded Resource

 

Results:

On IOS, it's OK for Both

On UWP it's OK for Stream loading, but I have an error on URL "An error occurred while loading the document"

On Android, OK for both URL and Stream loading, but when I rotate the device, the PDF Viewer is completely blocked.(tested on Nexus 5X emulator and Samsung S9 real device)

4 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 19 Apr 2019, 10:14 AM
Hello Tristan,

I will go straight to the mentioned issues:

 - I've tried loading an pdf document from an URL on UWP and it worked properly on my side, I have attached my test app, could you download it and give it a try?
- I have tested the same with rotating the device on Android emulators as well as Nexus 5X and Samsung S8 real devices and again, I didn't manage to reproduce the mentioned behavior.

In order to continue the research I will need more details on the concrete use case, can you please send me the pdf document you're using?  You would need to open a support ticket and attach it there.

Thanks in advance.

Regards,
Yana
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
tristan
Top achievements
Rank 1
answered on 19 Apr 2019, 01:23 PM

Thank you very much for your sample.

Indeed, it seems to be our PDF file wich is not compatible with your PdfViewer.

I have updated your sample with my PDF, and my element disposition to reproduce Android rotation issue.

 

It seems to be due to set the PDfViewer inside a StackLayout, in Android, the Pdf is blocked next to the rotation

 

PS: rename PdfViewer.png to PdfViewer.zip

0
tristan
Top achievements
Rank 1
answered on 19 Apr 2019, 01:31 PM
The project test file permits to see UWP issue too
0
Yana
Telerik team
answered on 22 Apr 2019, 11:29 AM
Hi Tristan,

I've tested the provided sample with the same pdf document, however, I wasn't able to reproduce both the issues.  I have tested the rotation issue on Android emulator as well as Nexus5 device and rotating it didn't block the UI, just the stack layout with the buttons is resized and could be scrolled due to the way the layout is organized.  
It is quite a strange issue, so is it possible to send us a short screencast showing the exact behavior you've observed?

As a side note, I'd like to ask you not to upload zip files to our forums in such a way.  If you need to send us other than images types of files, please open a support ticket and attach them there. We have a trial license for new users which will give you a 30-day dedicated support to help you complete a successful evaluation, for more details check our support plans here:
https://www.telerik.com/purchase/support-plans.  

Thank you for the understanding.

Regards,
Yana
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
PdfViewer
Asked by
tristan
Top achievements
Rank 1
Answers by
Yana
Telerik team
tristan
Top achievements
Rank 1
Share this question
or