toolbar.items Array

The following list indicates the default tools:

  • pager
  • zoomInOut
  • zoom
  • toggleSelection
  • search
  • open
  • download
  • print

For DPL Processing exportAs tool could be configured to export a single page to .png or .svg.

Example - customizing the toolbar items

<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
<div id="pdf-viewer"></div>
<script>
    $("#pdf-viewer").kendoPDFViewer({
        toolbar: {
            items: [
              "pager", "spacer", "open", "download"
            ]
        }
    });
</script>

Example - customizing the pager default tool

<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
<div id="pdf-viewer"></div>
<script>
    $("#pdf-viewer").kendoPDFViewer({
        toolbar: {
            items: [
              { type: "pager", input: false, previousNext: true, command: "PageChangeCommand"}
            ]
        }
    });
</script>

Example - customizing the zoom default tool

<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
<div id="pdf-viewer"></div>
<script>
    $("#pdf-viewer").kendoPDFViewer({
        toolbar: {
            items: [
              { type: "zoom", combobox: { zoomLevels: [50, 100, 200]}, command: "ZoomCommand"}
            ]
        }
    });
</script>

Apart from the built-in tools, the PDFViewer fully exposes the ToolBar.items API. This way you can specify any custom tools in the widget using the components available in the ToolBar itself.

In this article