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);

        }

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.