- Home
- Forum
- Xamarin.Forms
- Problem loading PDF in PdfViewer on Android
Problem loading PDF in PdfViewer on Android
Hello,
I get the following exception trying to load a PDF in PdfViewer on Android with version 16.1.0.26.
Same code works on iOS and also on Android with versions older than 16.X.
Andreas
[MonoDroid] System.ArgumentOutOfRangeException: The index can't be less then zero or greater then Count.
[MonoDroid] Parameter name: index
[MonoDroid] at Syncfusion.Pdf.Primitives.PdfArray.get_Item (System.Int32 index) [0x0000d] in <978e4ad3886745c38e0469bf3c61dfb0>:0
[MonoDroid] at Syncfusion.Pdf.Parsing.PdfLoadedPageCollection.GetPage (System.Int32 index) [0x00019] in <978e4ad3886745c38e0469bf3c61dfb0>:0
[MonoDroid] at Syncfusion.Pdf.Parsing.PdfLoadedPageCollection.get_Item (System.Int32 index) [0x00000] in <978e4ad3886745c38e0469bf3c61dfb0>:0
[MonoDroid] at Syncfusion.SfPdfViewer.XForms.Droid.LinearLayoutEx.RenderHyperlink (System.Int32 pageIndex) [0x00046] in <1c589328a0d14df7a16a0c57623edd27>:0
[MonoDroid] at Syncfusion.SfPdfViewer.XForms.Droid.ScrollViewEx.loadDocumentWorker_RunWorkerCompleted (System.Object sender, System.ComponentModel.RunWorkerCompletedEventArgs e) [0x00147] in <1c589328a0d14df7a16a0c57623edd27>:0
[MonoDroid] at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted (System.ComponentModel.RunWorkerCompletedEventArgs e) [0x00019] in <3bde2df37c934d2199016a625cfce462>:0
[MonoDroid] at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted (System.Object arg) [0x0000e] in <3bde2df37c934d2199016a625cfce462>:0
[MonoDroid] at Android.App.SyncContext+<>c__DisplayClass2_0.<Post>b__0 () [0x00000] in <23f599e2614b4e4bb6fbe53e6d6de3ca>:0
[MonoDroid] at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <23f599e2614b4e4bb6fbe53e6d6de3ca>:0
[MonoDroid] at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in <23f599e2614b4e4bb6fbe53e6d6de3ca>:0
[MonoDroid] at (wrapper dynamic-method) System.Object.022f2484-6867-4c5c-affe-5faff0564cd8(intptr,intptr)
SIGN IN To post a reply.
5 Replies
NK
Navaneetha Kannan Sudalai Muthu
Syncfusion Team
March 9, 2018 05:04 AM UTC
Hi Andreas,
Thank you for using Syncfusion products.
We are able to reproduce the issue “ArgumentOutOfRangeException occurs when loading single page PDF in Android”. But the issue did not occur in PDFs with more than one page. Kindly confirm whether you are getting the exception when loading a single page PDF.
The fix for the issue will be included in our Essential Studio Volume 1 – SP 1 which is expected to be available by the end of March 2018.
If you need a patch kindly create a support incident from your DirecTrac account.
Best,
Navaneetha Kannan
AN
Andreas
March 9, 2018 02:50 PM UTC
Hello,
Thanks. I can confirm it only crashes with single page PDFs.
Andreas
NK
Navaneetha Kannan Sudalai Muthu
Syncfusion Team
March 13, 2018 01:09 PM UTC
Hi Andreas,
A support incident to track the status of this query has been created under your account. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents
Kindly let us know if you need further assistance.
Best,
Navaneetha Kannan
LS
Luke Skinner
June 12, 2018 02:44 PM UTC
I'm also seeing the same crash on Android trying to open PDF files with 1 page.
Is there a solution for this that's public?
NK
Navaneetha Kannan Sudalai Muthu
Syncfusion Team
June 13, 2018 09:31 AM UTC
Hi Andreas,
The issue “Application crashes when a single page PDF is loaded” in both Xamarin.Forms and Xamarin.Android has been fixed in the latest version 16.1.0.37. We request you to kindly upgrade to the latest version to get the issue resolved. Please find the download link of Essential Studio 16.1.0.37 below.
Best,
Navaneetha Kannan
SIGN IN To post a reply.
- 5 Replies
- 3 Participants
-
AN Andreas
- Mar 8, 2018 08:14 PM UTC
- Jun 13, 2018 09:31 AM UTC