View a PDF from a hyperlink and not a Local Document

Question is all in title just wanna know if this is something you can do

3 Replies 1 reply marked as answer

MS Mohan Selvaraj Syncfusion Team November 24, 2020 12:48 PM UTC

Hi Justin,  
   
Thanks for using Syncfusion products.  
   
Can you please let us know whether your exact requirement is to load the file from the URL? If yes, we can provide the URL in the documentPath property or the load() method of our PDF Viewer control. Then in the controller, we can download and load the document by using the WebClient.  
   
                           WebClient WebClient = new WebClient();  
                            byte[] pdfDoc = WebClient.DownloadData(jsonData["document"]);  
                            stream = new MemoryStream(pdfDoc);  
   
   
   
   
   
Kindly provide more details if the provided details do not match your criteria.  
   
Regards,  
Mohan S 


JW Justin Wells November 24, 2020 04:29 PM UTC

Ya I would like to do is view a pdf and not download it.



AA Akshaya Arivoli Syncfusion Team November 25, 2020 03:44 PM UTC

Hi Justin, 

Thank you for your update. 

As mentioned earlier, we can load the PDF document from the URL in the PDF Viewer. We have also created the sample for the same and shared in the below link,  






Please try it and revert with more details about your requirement and the use case if you still have any concerns. 


Regards, 
Akshaya 


Marked as answer
Loader.
Up arrow icon