The DocViewer is a panel-level control which allows displaying a pdf document inline.
For full description of attributes and events of this object please access theĀ Client-Logic API
const docViewer = eventSource.window.getDocViewer('MyDocViewer'); docViewer.dispatchMethodCall('getPageCount') .then((numPages) => { console.log(numPages); }); |
The method setCallback can be used to set an event callback for events inside the SnowBound control.
// if the docviewer is not loaded DocViewer.setCallback('onDocumentLoad', () => { DocViewer.controller.hideToolbarButton('SaveDocument'); DocViewer.controller.hideSideToolbar(); return null; }); |