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

Read pdf from RestAPI - base64


I have a SfPdfViewer inside a CarouselPage (https://github.com/alexrainman/CarouselView) - which initialized through ViewModel (No requests out / in).
I need to get the Pdf document from a HTTP Request where I get, each time, a different PDF document as base64, or a token through which I can access and download the PDF (for example, api-site.com/downloadFile?token=TOKENHERE AND the GET has to be with a custom header: Token: <tokenhere> or just use the base64 file)

So, I really don't know what I can do in this scenario to achieve this requirement. I thought about making the request BEFORE moving to that window and then pass the base64 through constructor, though I don't even think it's possible to initialize SfPdfViewer with base64.

I really need your expertise and experience on this case - what's the appropriate solution? Performance is less relevant.


1 Reply

GR Gayathri Ramalingam Syncfusion Team August 15, 2019 01:15 PM UTC

Hi Aviad, 
We have analyzed the feasibility and created a workaround to open the PDF document from base64 string using SfPdfViewer in Xamarin.Forms. Please find the sample link from below, 
Could you please try the above sample and let us know whether the above proposed solution meets your requirement?   
With Regards, 
Gayathri R 

Live Chat Icon For mobile
Up arrow icon