...
Code Block | ||||
---|---|---|---|---|
| ||||
var oDocViewer = akioma.root.dynObject.getObject('SimpleSwatDocViewer').controller; var promise = oDocViewer.callDocViewerMethod('openSpecifiedDocuments', [ [{documentId: "6-Pages.tif", displayName: "Display-6-Pages"}, {documentId: "1234567.pdf", displayName: "Display-1234567"}] ]) |
Code Block | ||||
---|---|---|---|---|
| ||||
// Get page count example
const docViewer = eventSource.window.getDocViewer('MyDocViewer');
docViewer.dispatchMethodCall('getPageCount')
.then((numPages) => {
console.log(numPages);
});
// Opening several documents in different tabs
docViewer.dispatchMethodCall('openSpecifiedDocuments'. [{documentId: 'myfile.pdf', displayName: 'My File'}])
.then((numPages) => {
console.log(numPages);
}); |
Further documentation here
...