execute

Executes a command of the PDFViewer.

To run the below example, open it in Dojo

Example

<div id="example">
  <button id="download">Download</button>
  <div id="pdfViewer"></div>
</div>
<script type="module">
  $(document).ready(function () {
    $("#pdfViewer").kendoPDFViewer({
      pdfjsProcessing: {
        file: "https://demos.telerik.com/kendo-ui/content/web/pdfViewer/sample.pdf",
      },
      width: "100%",
      height: 1000,
      toolbar: {
        items: ["pager", "spacer", "open", "download"],
      },
    });
    $("#download").click(onDownloadClick)
    function onDownloadClick() {
      var pdfViewer = $("#pdfViewer").data("kendoPDFViewer");
      pdfViewer.execute({ command: "DownloadCommand" });
    }
  });
</script>
In this article
execute
Not finding the help you need?
Contact Support