how to load pdf which having http and https in there urls included

Hi,

I want to load pdf dynamically which I am storing in DB.

I am passing the document path dynamically which I am creating in ts file.

example: I want to load this pdf in pdf viewer
public service: string = 'https://ej2services.syncfusion.com/production/web-services/api/pdfviewer';
    public document: string = 'http://www.africau.edu/images/default/sample.pdf';

1 Reply

AA Akshaya Arivoli Syncfusion Team February 27, 2020 07:36 AM UTC

Hi Shahbaz ,   
 
Thank you for contacting Syncfusion support.   
  
PDF Viewer does not have support to load the PDF document from the URL directly. However, you can load the PDF document by converting the URL to bytes on the server-side at the sample level. We have created a sample for the same and shared in the below link,   
  
  
Note: Kindly run the web service project first and provide that URL to the serviceUrl property of the PDF Viewer.   
  
Please refer to the below KB to create the PDF Viewer web service project,   
 
  
Please try it and revert us with more details if you have any concerns on this.   
  
Regards,   
Akshaya   


Loader.
Up arrow icon