none
How to display pdf in browser from database using Xamarin and SQL Server RRS feed

  • Question

  • I have a listview in Xamarin form, which you can see in the screenshot here:
    https://i.stack.imgur.com/1gTv6.png

    and this is my database structure
    https://i.stack.imgur.com/8GHFc.png

       

    as you can see in database i have file content which is in binary format and these binary data are pdf files, i need to display these pdf in browser.

    In my listview, I am retrieving data with button, what i want is  when the user clicks on button, a PDF file should open in browser from the database based on id.

    This is my xaml code

    <ListView.ItemTemplate>
            <DataTemplate>
                <ViewCell>
                    <StackLayout Orientation="Vertical" Padding="12,6">
                        <Label Text="{Binding ReportName}" 
                               FontSize="24" 
                               Style="{DynamicResource ListItemTextStyle}" />
                        <Label Text="{Binding Date}"  
                               FontSize="18" 
                               Opacity="0.6"
                               Style="{DynamicResource ListItemDetailTextStyle}"/>
                          <Button Clicked="ShowPDF" Text="View" CommandParameter="{Binding FileContent}"></Button>
                    </StackLayout>
                </ViewCell>
            </DataTemplate>
        </ListView.ItemTemplate>









            
    • Edited by veezo Monday, April 16, 2018 10:18 AM
    Monday, April 16, 2018 10:11 AM

All replies

  • Hi veezo,

    Welcome to IE extension development forum.

    Since this forum is talking about the ie develop issue, not xamarin forum, I suggest you could post this issue on by below forum.

    https://stackoverflow.com/questions/tagged/xamarin

    Besides, if you want to show PDF in the xamarin webview.

    I suggest you could refer to below article.

    https://developer.xamarin.com/recipes/cross-platform/xamarin-forms/controls/display-pdf/ 

    Best Regards,

    Brando


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, April 18, 2018 8:55 AM