0

I have an application on Xamarin Android, and I need to open a PDF, but I have the Document in a byte array, because I use it from an Api web. And in the Syncfusion documentation, I did not find much information, just the method "Assets.Open (" GIS Succinctly.pdf ");", which opens the document from a "string", is there any way to pass the arrangement to PdfViewer?

        SfPdfViewer pdfViewer;
        string Mail, Pass, LlaveEmp = string.Empty;
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.RecibosPago);

            pdfViewer = FindViewById<SfPdfViewer>(Resource.Id.pdfviewercontrol);
            Stream PdfStream = Assets.Open("GIS Succinctly.pdf");
            pdfViewer.LoadDocument(PdfStream);

        }
Oscar Navarro
  • 150
  • 10

1 Answers1

0

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

The below KB link illustrates how to display PDF document from URL using SfPdfViewer in Xamarin.Android:

Syncfusion KB link

Please let us know if you need any other assistance.

Regards,

Sathish.

Syncfusion Support

SATHISH
  • 42
  • 6