SfPdfViewer does not display PDF document when Toolbar is disabled

Hi,

I want to display a PDF which has been loaded from the internet in an Xamarin.Forms app with SfPdfViewer. I'm using MVVM and the Prism Framework and created a property in the viewmodel that InputFileStream is being bound to.
This works great and the PDF document is being displayed. 

But, when I want  to disable the Toolbar of the control. It doesn't matter, if I set SfPdfViewer.Toolbar.Enabled = false in Code-Behind (after InitializeComponents) or if I do it in XAML (as described here). The PDF document is not being displayed.

I was able to reproduce this and attached a minimal solution.

Am I doing something wrong here? How can I disable/hide the toolbar and show a PDF document?


Thanks in advance,
Hendryk

P.S.: I referenced the following NuGet package in my platform projects and the shared project (netstandard2.0): Syncfusion.Xamarin.SfPdfViewer v16.2.0.46





Attachment: XfSfPdfSampleNoToolbar_3b9ec604.zip

3 Replies

KK Karthik Krishnaraj Syncfusion Team August 17, 2018 12:24 PM UTC

Hi Hendryk, 
 
We have confirmed the issue in our side and we have logged a defect report. The fix will be included in our Essential Studio Volume 3 release which is expected to be rolled out in the end of September, 2018. 
 
Regards, 
Karthik. 



TM Tran Minh Huong September 13, 2018 03:30 AM UTC

XAML:

<Grid HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
            <Grid.RowDefinitions>
                <RowDefinition Height="50"  />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <Grid Grid.Row="0" BackgroundColor="#E9E9E9" HorizontalOptions="Fill" VerticalOptions="Fill">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="4*" />
                    <ColumnDefinition Width="2.5*" />
                    <ColumnDefinition Width="0.2*" />
                    <ColumnDefinition Width="1.5*" />
                    <ColumnDefinition Width="1.5*" />
                    <ColumnDefinition Width="1.5*" />
                    
                </Grid.ColumnDefinitions>

                <Button x:Name="goBack" Grid.Column="0" BackgroundColor="Transparent" Image="goback.png" HorizontalOptions="Center" VerticalOptions="Center"/>
                
                <Entry Keyboard="Numeric" Grid.Column="1" FontSize="18" x:Name="pageNumberEntry" HorizontalTextAlignment="Center" HorizontalOptions="FillAndExpand"  VerticalOptions="Center"/>
                <Label Text="/" Grid.Column="2" FontSize="18" VerticalTextAlignment="Center" HorizontalTextAlignment="Center" HorizontalOptions="FillAndExpand" VerticalOptions="Center"/>
                <Label x:Name="pageCountLabel" Grid.Column="3" FontSize="18" VerticalTextAlignment="Center" HorizontalTextAlignment="Center" HorizontalOptions="FillAndExpand" VerticalOptions="Center"/>
                <Button x:Name="goToNextButton"  Grid.Column="4" BackgroundColor="Transparent" Image="PageDown.png" HorizontalOptions="Center" VerticalOptions="Center"/>
                <Button x:Name="goToPreviousButton" Grid.Column="5" BackgroundColor="Transparent" Image="PageUp.png" HorizontalOptions="Center" VerticalOptions="Center"/>

                
                
            </Grid>

            <sfpdfviewer:SfPdfViewer  x:Name="pdfViewerControl" Grid.Row="1" HorizontalOptions="Fill" VerticalOptions="Fill">
            </sfpdfviewer:SfPdfViewer>

        </Grid>


.cs
InitializeComponent ();

      ....
         
            pdfViewerControl.Toolbar.Enabled = false;


LN Lakshmi Narayanan Asokan Syncfusion Team September 13, 2018 05:25 AM UTC

Hi Hendryk,  
 
Thank you for your code snippet to reproduce the issue. 
  
We have confirmed the issue in our side and we have logged a defect report. We promised earlier, the fix will be included in our Essential Studio Volume 3 release which is expected to be rolled out in the end of September, 2018.  
 
Best, 
Lakshmi Narayanan Asokan 


Loader.
Up arrow icon