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
- dispatchMethodCall(methodName: string, params: any = null)
Code Block | ||
---|---|---|
| ||
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.
- setCallback(eventName: DocViewerEventType, callback: (params: any)
Code Block |
---|
// if the docviewer is not loaded
DocViewer.setCallback('onDocumentLoad', () => {
DocViewer.controller.hideToolbarButton('SaveDocument');
DocViewer.controller.hideSideToolbar();
return null;
}); |