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/4.3.136/pdf.mjs" type="module"></script> <!-- Include pdf.js before the kendo scripts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/4.3.136/pdf.worker.mjs" type="module"></script> <!-- Include pdf.worker.js before the kendo scripts -->
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2024.4.1112/js/kendo.all.min.js" type="module"></script>
<script type="module">
$("#pdfviewer").kendoPDFViewer({
pdfjsProcessing: {
file: "../non-existing-file.pdf"
},
error: function (e) {
console.log("error message: " + e.message);
}
});
</script>