error

Fires when an error is encountered. By default, a dialog is shown with error message. The dialog will not be shown if the event is prevented.

Event Data

e.sender kendo.ui.PDFViewer

The widget instance which fired the event.

e.dialog kendo.ui.Dialog

The error dialog instance.

e.error Object

The encountered error. Might show the file or xhr request.

e.message String

The error message displayed in the dialog.

Example

<div id="pdfviewer"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>

<script>
   window.pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.worker.js';
</script>

<script>    
  $("#pdfviewer").kendoPDFViewer({
    pdfjsProcessing: {
      file: "../non-existing-file.pdf"
    },
    error: function (e) {
      console.log("error message: " + e.message);
    }
  });
</script>
In this article