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

data('ejpdfviewer') doesn't exist

Thread ID:





148521 Oct 23,2019 12:55 PM UTC Oct 25,2019 05:20 AM UTC ASP.NET Web Forms (Classic) 4
Tags: PDFViewer
Asked On October 24, 2019 07:57 AM UTC


I use PdfViewer for ASP.Net Web Forms to display pdf and your select to change pdf wich is displayed. To make it, I used your documentation here : https://asp.syncfusion.com/demos/web/pdfviewer/default.aspx

But when I change the pdf with this select I have an error in the console : Uncaught TypeError: Cannot read property 'load' of undefined.

It don't find 'ejpdfviewer', I don't know why.

I use this function : 
function onChange(args) {
            var _filename = args.value;
            var _ejPdfViewer = $(#MainContent_PdfViewer2").data("ejPdfViewer");

Akshaya Arivoli [Syncfusion]
Replied On October 24, 2019 09:39 AM UTC

Hi Judicael, 

Thank you for contacting suycfusion support.  

Based on the provided details we suspect that PDF Viewer instance is not obtained properly, so the error is thrown. Can you please ensure the below things, 

  1. In the provided code we can see that the code to get the PDF Viewer instance is not provided properly. Please find the modified code,
function onChange(args) { 
            var _filename = args.value; 
            var _ejPdfViewer =$(“#MainContent_PdfViewer2").data("ejPdfViewer"); 

  1. Ensure to provide the correct PDF Viewer’s Div ID to get its instance
  2. Ensure the PDF Viewer instance is obtained.
  3. Ensure whether the PDF Viewer is initialized, before calling the load() API.
  4. Ensure to refer all the necessary Scripts and CSS in your project as provided in this link.
  5. Ensure to refer the Scripts, CSS and packages of same version in your project.
We have also created the sample for the same and shared in the below link, 

Please try this and revert us with more details, Essential Studio version, error details and modified sample if you still have concerns. These details will be helpful for us to investigate further on this and update you. 


Replied On October 24, 2019 11:05 AM UTC


it's just an typing error in my topic, sorry...

I use Syncfusion.ASP.Net V17.3.0.19, Syncfusion.EJ.pdfviewer V17.3.0.19.

I relooked all your point and I look the sample project and I have same things you have but I always this error in the console of my navigator : Uncaught TypeError: Cannot read property 'load' of undefined.

When I do console.log($("#MainContent_PdfViewer2").data()) to look if I find 'ejpdfviewer', there is nothing.... 

I attach my differents files

Attachment: pdfviewer_604b8e7d.zip

Replied On October 24, 2019 12:55 PM UTC

hum.... Ok I did it, it works :)

I put the Jquery script in Site.master and the rest of scripts in my page with pdfviewer. 

thanks for your helps

Akshaya Arivoli [Syncfusion]
Replied On October 25, 2019 05:20 AM UTC

Hi Judicael, 

Thank you for your update. We are glad to hear that the issue is resolved.  



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