Code Block |
---|
language | js |
---|
title | Sample for method call with no without parameters |
---|
|
var oDocViewer = akioma.root.dynObject.getObject('SimpleSwatDocViewer').controller;
var promise = oDocViewer.callDocViewerMethod('getPageCount')
promise.then((numPages) => {
console.log('PageCount', numPages);
}) |
Code Block |
---|
language | js |
---|
title | Sample for method call with parameters |
---|
|
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 |
---|
language | js |
---|
title | Example from CLAPI |
---|
|
// 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
View file |
---|
name | VirtualViewerHTML5JavaClientAdminGuide.pdf |
---|
height | 250 |
---|
|