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

PDF file not displayed for Windows UWP in release mode

I'm having an issue where an PDF file does not appear. This happens ONLY in release mode and ONLY for the UWP app.

The pdf-file is added as an embedded resource in an Assets folder in the PCL project.

Android app and iOS app both work fine in Debug and Release mode.

Any advice on this issue ?

(I'm running on Visual Studio 2015, Xamarin.Forms v2.3.4.247 and Syncfusion.Xamarin.sfPdfViewer v15.2.0.40)

Attachment: PDFViewr_b64859cf.zip

1 Reply

BS Balasubramanian Sundararajan Syncfusion Team June 1, 2017 07:18 AM UTC

Hi Raivo, 
Thank you for using Syncfusion product. 

Currently SfPdfViewer control does not render in release mode in Xamarin.Forms UWP and custom controls will not render when deploying the application in release mode. This is a known Framework issue in the Xamarin.Forms UWP platform. We have posted the query in the Bugzilla forum. Please refer the below Bugzilla link for more details. 


This problem can be resolved by passing the assemblies to include when initializing the Xamarin.Forms in App.xaml.cs in the UWP project as mentioned in the below code example, 
rootFrame = new Frame(); 
rootFrame.NavigationFailed += OnNavigationFailed; 
List<Assembly> assembliesToInclude = new List<Assembly>(); 
//Now, add in all the assemblies your app uses  
//Also do this for all your other 3rd party libraries  
Xamarin.Forms.Forms.Init(e, assembliesToInclude); 
Please add the following code in the MainPage.xaml.cs after initializing the component to initialize PdfDocumentViewRenderer. 
new SfPdfDocumentViewRenderer(); 
Please try the above solution and let us know whether the issue is resolved at your end. 
Balasubramanian S 

Live Chat Icon For mobile
Up arrow icon