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.
Related Properties
- toolbar.items.type
- toolbar.items.overflow
- toolbar.items.command
- toolbar.items.name
- toolbar.items.click
- toolbar.items.toggle
- toolbar.items.togglable
- toolbar.items.text
- toolbar.items.template
- toolbar.items.showText
- toolbar.items.primary
- toolbar.items.attributes
- toolbar.items.enable
- toolbar.items.hidden
- toolbar.items.spriteCssClass
- toolbar.items.imageUrl
- toolbar.items.showIcon
- toolbar.items.icon
- toolbar.items.id