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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Load PDF

Thread ID:

Created:

Updated:

Platform:

Replies:

144297 Apr 29,2019 03:36 PM UTC Apr 30,2019 11:06 AM UTC JavaScript - EJ 2 3
loading
Tags: PDF Viewer
BERNARD Ludovic
Asked On April 29, 2019 03:36 PM UTC

Hi I want to use the control Pdf viewer using Web (Essential JS 2) and javascript (ES5).

But I can't manage make it work without us serviceURL.

I want to load the pdf using a path or with an ObjectURL but nothing work. Do you have any example which open a PDF without using the serviceUrl ?

Also I want to add icons into the PDF pages. (ex: add pin to a the map of a building). Can you provide an example about how I can achieve this?

Thank you

Ramya Thirugnanam [Syncfusion]
Replied On April 30, 2019 05:21 AM UTC

Hi Bernard, 
 
Thank you for contacting Syncfusion support. 
 
Please find the details for your query in the following table. 
 
Query 
Details 
I want to use the control Pdf viewer using Web (Essential JS 2) and javascript (ES5). 
 
But I can't manage make it work without us serviceURL. 
 
I want to load the pdf using a path or with an ObjectURL but nothing work. Do you have any example which open a PDF without using the serviceUrl ? 
serviceUrl property of the PDF viewer control is used to specify the URL of the service to render PDF documents. Service is necessary for the PDF viewer control to load and process the PDF document. So that, the document can be rendered in the client side. 
 
PDF Viewer do not have support to load the PDF document from the blob URL or blob object directly. However, you can load the blob object of PDF document by converting the blob to base64 string using the client-side load() API in the sample level.  
  
Kindly refer the below forum for retrieving the Blob URL of PDF document and displaying the document in the PDF Viewer control.  
  
  
We can also retrieve the blob and convert the same as the base64 string from the server side.  
  
Please replace the provided GetDocument() method in the below provided KB ,for retrieving the Blob URL as the base64 string and for loading the same in the PDF Viewer control   
  
  
Server side :  
 
public string GetDocument ()  
        {  
CloudBlobContainer _cloudBlobContainer = _blobClient.GetContainerReference(_containerName);      
      CloudBlockBlob _blockBlob = _cloudBlobContainer.GetBlockBlobReference(referencename);        
      MemoryStream memoryStream = new MemoryStream();       
      _blockBlob.DownloadToStream(memoryStream)    
string docBase64 = "data:application/pdf;base64," + Convert.ToBase64String(memoryStream.ToArray());  
      return (docBase64);  
}  
  
Also I want to add icons into the PDF pages. (ex: add pin to a the map of a building). Can you provide an example about how I can achieve this? 
Currently, we do not provide support to add icons or images to the PDF pages using PDF Viewer control. However, we are already working on to implement comments with predefined sticky note icons and stamp annotation along with custom stamp. 
 
Can you please confirm us that you need to add the icon for adding comment or as stamp in the PDF document? If your requirement is different than the above details, please provide us more details about your requirements. So that it will be helpful for us to analyze further and assist you better. 
 
Regards, 
Ramya T 


BERNARD Ludovic
Replied On April 30, 2019 07:09 AM UTC

Thank you for your response,

I need to add icons like marker in google map.
I have a PDF map and I want to pin the position(icon) of differents buildings on it.

Regards

Ramya Thirugnanam [Syncfusion]
Replied On April 30, 2019 11:06 AM UTC

Hi Bernard, 
 
Thanks for your update. 
 
As we have updated earlier, we have plans to implement stamp annotation feature in PDF Viewer control. Now, you can now track the status of your request, review the proposed resolution timeline, and contact us for any further inquiries through below link.   
 
 
We can add images as custom stamps after this implementation. So, we can add the pin image as custom created stamp with this feature to the PDF document. Could you please confirm us whether this meets your requirement? 
 
Regards, 
Ramya T 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon