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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to display PDF document from URL using SfPdfViewer in Xamarin.Android?

Platform: Xamarin.Android |
Control: PdfViewer |
Published Date: September 15, 2017 |
Last Revised Date: February 19, 2019

How to display PDF document from URL using SfPdfViewer in Xamarin.Android?

At present SfPdfViewer in Xamarin.Android do not have a direct support to display the PDF document from URL. However, as a workaround you can download the document or files from URL as Stream using WebClient class and load it in the PDF viewer.

The below code snippet illustrates how to download the PDF document from URL as Stream using WebClient:



Then we can load the downloaded PDF document Stream to display it in PDF viewer in Xamarin.Android. Please find the code snippet below for your reference:



We have also attached the sample of this complete illustrations here

You must log in to leave a comment
Jun 12, 2018

It is not loading all the pages of the PDF file, It loads only one or two pages only. Is there any solution for that.

Jun 12, 2018

I have tested with Xamarin forms project it is not working, I tested with Xamarin android project it is working fine.

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon