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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Does pdf viewer load document based online i.e. from url instead of Streaming?

Thread ID:

Created:

Updated:

Platform:

Replies:

132481 Sep 5,2017 03:26 AM UTC Sep 12,2017 09:47 AM UTC Xamarin.Android 3
loading
Tags: PdfViewer
Ishwor Khanal
Asked On September 5, 2017 03:26 AM UTC

Does pdf viewer load document based online i.e. from url instead of Streaming? It will be far better to read file from url as well. Thank you.

Sathish Sivakumar [Syncfusion]
Replied On September 5, 2017 10:46 AM UTC

Hi Ishwor, 

Thank you for using Syncfusion products 

At present we do not have support to load the PDF document straight away from URL in SfPdfViewer in Xamarin. However, As a work around we can achieve it by downloading the PDF document from URL as Stream using WebClient and load the downloaded stream into SfPdfViewer to display appropriate PDF document in Xamarin.Android application.  

Please find the code snippet below to download the PDF document from URL as a Stream using WebClient. 

Code Snippet: 

private Stream DownloadPdfStream(string URL) 
{ 
//Initialize WebClient 
WebClient webClient = new WebClient(); 
 
// Initialize Uri 
var uri = new System.Uri(URL); 
//Returns the PDF document stream from the given URL 
return webClient.OpenRead(uri); 
 
} 


We have also attached the sample in the below link for your reference. 


Please let us know if you need any other assistance. 

Regards, 
Sathish 


Ishwor Khanal
Replied On September 11, 2017 02:04 PM UTC

Thank you for your response. I wonder how big the file it can load because when I tried to load a pdf file having 100 pages it shows nothing and app becomes ANR.


Sathish Sivakumar [Syncfusion]
Replied On September 12, 2017 09:47 AM UTC

Hi Ishwor, 

We are unable to reproduce “Application not responding when we download and load the large PDF document into SfPdfViewer in Xamarin.Android” in our side. We tried to reproduce the issue by downloading the PDF document from the below URL and load it into SfPdfViewer. 


We have also attached the video which we captured while trying to reproduce the reported issue and it is available in the below link: 


We would request you to kindly create a new support incident using the link here and share the following details to investigate further on your issue: 

  1. URL link which you tried to download the PDF document and load the same in SfPdfViewer
  2. Simple sample or modify the sample which we shared in our previous update to reproduce the reported issue.
  3. Android device configuration and its version
  4. Replication procedure to reproduce the reported issue.

Regards, 
Sathish 


CONFIRMATION

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.

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

;