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

Unable to correctly display SfPdfViewer GettingStarted page as modal dialog

I attempted to display the GettingStarted xaml page for the SfPdfViewer control (https://help.syncfusion.com/xamarin/sfpdfviewer/getting-started) as a modal dialog in Xamarin Forms but I ran into two issues: (1) it errors on double-tap (with or without the DoubleTapped setting in XAML) and (2) it displays at max zoom level at the start (it can be manually unzoomed by unpinching but this should be unnecessary).

The double-tap error is as follows:

Message: Object reference not set to an instance of an object
Source: Syncfusion.SfPdfViewer.XForms.iOS
StackTrace: at Syncfusion.SfPdfViewer.XForms.iOS.ScrollViewEx.OnDoubleTap (UIKit.UIGestureRecognizer gesture) [0x00021] in <68e0739786774eedac78f1480b2a97bd>:0 
  at UIKit.UITapGestureRecognizer+Callback.Activated (UIKit.UITapGestureRecognizer sender) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/ 
  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) [0x0002c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/ 
  at CrxMobile.iOS.Application.Main (System.String[] args) [0x00002] in C:\Users\tscheffel\Source\Repos\CrxMobile\CrxMobile.iOS\Main.cs:15

Code to display the GettingStarted page as a modal dialog is as follows.  I can display other XAML pages as modal dialogs with no issues (though they do not contain the the SfPdfViewer control).

    var pdfViewerPage = new GettingStarted();
    pdfViewerPage.ToolbarItems.Add(new ToolbarItem { Text = "Close", Icon = "Close", Command = new Command(() => App.Current.MainPage.Navigation.PopModalAsync()) });
    var modalDialog = new NavigationPage(pdfViewerPage);
    await App.Current.MainPage.Navigation.PushModalAsync(modalDialog);


    License: Essential Studio Xamarin
    VS2017 Professional 15.9.3
Xamarin.iOS & Xamarin.Mac SDK

Thanks for your time!


3 Replies

KK Karthik Krishnaraj Syncfusion Team December 12, 2018 07:26 AM UTC

Hi Troy, 
Greetings from Syncfusion, 
We were able to reproduce the reported issues from our side. The fix for these issues will be included in our Essential Studio 2018 Volume 4 release which will be rolled out in the end of December 2018.  

TS Troy Scheffel December 19, 2018 04:48 PM UTC

The new NuGet package for SfPdfViewer ( does indeed resolve this bug.  Thanks.

KK Karthik Krishnaraj Syncfusion Team December 20, 2018 10:54 AM UTC

Hi Troy, 
We are glad to know that your reported issues have been resolved. Please let me know if you have any other query. 

Live Chat Icon For mobile
Up arrow icon