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
close icon

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/12.2.1.10/src/Xamarin.iOS/UIKit/UIGestureRecognizer.cs:205 
  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/12.2.1.10/src/Xamarin.iOS/UIKit/UIApplication.cs:79 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0002c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.10/src/Xamarin.iOS/UIKit/UIApplication.cs:63 
  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);

Parameters:

    License: Essential Studio Xamarin
    Syncfusion.Xamarin.Core 16.3.0.36
    Syncfusion.Xamarin.SfPdfViewer 16.3.0.36
    VS2017 Professional 15.9.3
Xamarin 4.12.3.73
Xamarin.iOS & Xamarin.Mac SDK 12.2.1.11

Thanks for your time!

Troy


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.  
 
Regards, 
Karthik. 



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

The new NuGet package for SfPdfViewer (16.4.0.42) 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. 
 
Regard, 
Karthik. 


Loader.
Live Chat Icon For mobile
Up arrow icon