open

Fires when a PDF is opened in the viewer.

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({
      open: function (e) {
         kendo.alert("file opened: " + e.file.name);
      },
   });
</script>

Event Data

e.sender kendo.ui.PDFViewer

The widget instance which fired the event.

e.file Object

The file that will be displayed in the viewer.

In this article