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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Load PDF from API in Xamarin.Android not working.

Thread ID:





144389 May 3,2019 04:42 PM UTC May 6,2019 05:23 AM UTC Xamarin.Android 1
Tags: PdfViewer
Antonio Raynor
Asked On May 3, 2019 04:42 PM UTC

 I have successfully loaded PDFs from Assets in my Xamarin.Android project,  but I want to also load PDFs from an API source.

(To test the pdfViewer, I have built a working demo with Xamarin.Forms which loads my document from my API so I am satisfied that it will work.)

Below is a snippet of my Xamarin.Android code that currently does not show my PDF.

                    Stream pdfStream = _apiHelper.DownloadPdfStream(pdfHandbook);




                    _pdfViewer.Toolbar.Enabled = false;


                    _pdfViewer.AnnotationSettings.HandwrittenSignature.Color = Android.Graphics.Color.Blue;

                    _pdfViewer.AnnotationSettings.HandwrittenSignature.Thickness = 2;



               public Stream DownloadPdfStream(string source)


                    var endpoint = $"https://documents.azure.net/{source}";


                    var uri = new Uri(endpoint);

                   return m_webClient.OpenRead(uri);


Sathish Sivakumar [Syncfusion]
Replied On May 6, 2019 05:23 AM UTC

Hi Antonio, 

Greetings from Syncfusion. 

We can download the PDF document from web URL as a stream and load the same in PdfViewer in Xamarin.Android. Please refer the sample in the below link for your reference. 

Kindly share the web URL from which you want to download the PDF document and load the same in PdfViewer to analyze further on this issue. 



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

Live Chat Icon For mobile
Live Chat Icon