Hi,
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.LoadDocument(pdfStream);
_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);
}