Xamarin.Forms - Android - Error Trying to Draw Pdf

Hi, 

I'm trying to open a specific pdf on the android device, but it's getting this error and the app crash:

Canvas: trying to draw too large(107869788bytes) bitmap.

On ios device the pdf opens successfully.


Syncfusion.Xamarin.SPdfViewer (19.4.0.47)

Xamarin Forms (5.0.0.2337)

Regards,

Rodrigo Alves


5 Replies

SP SarathKumar Prakash Syncfusion Team February 7, 2022 09:29 AM UTC

Hi Rodrigo Alves,

We were unable to reproduce the issue with PDF documents which we have.
Kindly share the following details to analyze more on this issue and assist you with the better solution    
  
1.Simple sample to reproduce the issue.     
2.Replication video/procedure to reproduce the issue.    
3.PDF document    
 
Regards,
Sarath Kumar.
 



RA Rodrigo Alves February 8, 2022 12:57 PM UTC

Hi, 

As requested, follow file with pdf document, demonstration videos and attachment with the error.

1-sampleVideo with android error

2- sampleVideoiOS working

3- PDF file

4- Attachment with error


Regards,

Rodrigo Alves


Attachment: Syncfusion_Issue_Sample20220208T125459Z001_83fc94a2.zip


RA Rodrigo Alves February 8, 2022 01:35 PM UTC

To analyze more the issue i'm sharing a project with the file


Attachment: PdfViewerAndroidError_e72ebeef.zip


SP SarathKumar Prakash Syncfusion Team February 9, 2022 01:24 PM UTC

Hi Rodrigo Alves, 

Greetings from Syncfusion  
We were able to reproduce the issue, “Exception occurs while loading particular PDF in particular device”. Currently, we are validating this issue and we will update the further details on February 11, 2022.  
 
Regards,
Sarath Kumar.
 



SP SarathKumar Prakash Syncfusion Team February 11, 2022 10:05 AM UTC

Hi Rodrigo Alves,

This is a sample level issue. This issue will occur when resolution of the resource is too large to render.
Please add these lines in application tag of AndroidManifest.xml file to overcome this issue.
android:largeHeap="true" android:hardwareAccelerated="false"
Please feel free to contact us if you need any further assistance.

Regards,
Sarath Kumar.



Loader.
Up arrow icon