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. Image for the cookie policy date

Uncaught exception in SfPdfViewer under iOS 13.3 - v17.4.0.41

System.ArgumentOutOfRangeException: The index can't be less then zero or greater then Count.
Exception is thrown when trying to load some PDF documents.
Pls. see sample project attached for reproduction of the issue

Exception log:

Parameter name: index
  at Syncfusion.Pdf.Primitives.PdfArray.get_Item (System.Int32 index) [0x0000d] in <95823c0bf51a47ef8ee71d19da2df5b2>:0
  at Syncfusion.Pdf.Interactive.PdfLoadedStyledAnnotation.ObtainColor () [0x00066] in <95823c0bf51a47ef8ee71d19da2df5b2>:0
  at Syncfusion.Pdf.Interactive.PdfLoadedStyledAnnotation.get_Color () [0x00000] in <95823c0bf51a47ef8ee71d19da2df5b2>:0
  at Syncfusion.SfPdfViewer.XForms.iOS.ScrollViewEx.AddExistingTextAnnotation (System.Int32 pageIndex) [0x00243] in <d295e89e405946e59f6ab7d5c4856f05>:0
  at Syncfusion.SfPdfViewer.XForms.iOS.ScrollViewEx.LoadDocument (System.IO.Stream inputStream) [0x00511] in <d295e89e405946e59f6ab7d5c4856f05>:0
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1021
  at Foundation.NSAsyncSynchronizationContextDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/
  at at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/
  at PdfSample.iOS.Application.Main (System.String[] args) [0x00001] in /Users/Shared/development/PdfSample/PdfSample.iOS/Main.cs:17

Attachment: PdfSample_89b4a526.zip

4 Replies

GR Gayathri Ramalingam Syncfusion Team January 13, 2020 03:25 PM UTC

Hi Arno,  
We were able to reproduce the issue “System.ArgumentOutOfRangeException thrown while loading particular PDF document." in our side and we suspect this to be a defect. We have forwarded this issue to our development team for further analysis and we will update further details by 17-January-2020. 
With Regards, 
Gayathri R 

JP Jhansi Priya Ramesh Syncfusion Team January 17, 2020 01:15 PM UTC

Hi Arno, 
Sorry for the inconvenience. 
We are still working on validating the issue “System.ArgumentOutOfRangeException thrown while loading particular PDF document. We will update the further details on 21st January 2020 without further delay. 
Jhansi Priya Ramesh 

JP Jhansi Priya Ramesh Syncfusion Team January 21, 2020 03:51 PM UTC

Hi Arno, 
We confirm that the issue “System.ArgumentOutOfRangeException thrown while loading particular PDF document is a defect and logged defect report for the same. We will include the fix for this issue in our weekly release which is scheduled on  4th February 2020. 
Jhansi Priya Ramesh 

JP Jhansi Priya Ramesh Syncfusion Team February 6, 2020 01:57 PM UTC

Hi Arno, 
The fix for the issue System.ArgumentOutOfRangeException thrown while loading particular PDF document has been included in our latest weekly release of version Kindly update the PdfViewer to latest version to get your issue resolved. Please let us know if any further assistance required. 
Jhansi Priya Ramesh 

Live Chat Icon For mobile
Up arrow icon