Hello.
When trying to add a signature on the last page of the opened document, an exception is thrown, the application crashes.
This problem occurs when adding a signature on the last page as the current page when using AddHandwrittenSignature (handwrittenSignature), as well as when adding a signature when using the pageNumber field with the last page number in the AddHandwrittenSignature (handwrittenSignature, pageNumber).
Exception details:
{System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Syncfusion.SfPdfViewer.XForms.iOS.ScrollViewEx.AddHandwrittenSignature (Syncfusion.SfPdfViewer.XForms.HandwrittenSignature signature, System.Int32 pageNumber) [0x00033] in <934dede892dd462ebe88e138e695028e>:0
at Syncfusion.SfPdfViewer.XForms.iOS.PdfViewerDependencyService.AddHandwrittenSignature (Syncfusion.SfPdfViewer.XForms.HandwrittenSignature signature, System.Int32 pageNumber, System.Object nativeObject) [0x00003] in <934dede892dd462ebe88e138e695028e>:0
at Syncfusion.SfPdfViewer.XForms.SfPdfViewer.AddHandwrittenSignature (Syncfusion.SfPdfViewer.XForms.HandwrittenSignature signature, System.Int32 pageNumber) [0x00033] in :0
at AppConverter.ViewModels.SignPdfViewModel.SignatureAdded (System.Object sender, Syncfusion.SfPdfViewer.XForms.InkAddedEventArgs args) [0x000e4] in ...ViewModel.cs:119
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.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/13.20.2.2/src/Xamarin.iOS/Foundation/NSAction.cs:178
--- End of stack trace from previous location where exception was thrown ---
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/13.20.2.2/src/Xamarin.iOS/UIKit/UIApplication.cs:86
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.20.2.2/src/Xamarin.iOS/UIKit/UIApplication.cs:65
at ....iOS.Application.Main (System.String[] args) [0x00001] in ...iOS\Main.cs:12 }