Customize settings of web control
In This Topic
WebUiControlJS control and derived controls (
WebDocumentViewerJS,
WebPdfDocumentEditorControlJS,
WebSpreadsheetDocumentEditorControlJS,
WebDicomControlJS) allow to define DOM-element, which should be used as container for UI control (web document viewer, web spreadsheet document editor control, web DICOM viewer control), and allow to define a collection of UI elements, which represent the user interface of UI control.
Here is JavaScript code that demonstrates how to create web document viewer with default settings:
// create the default web document viewer settings
var docViewerSettings = new Vintasoft.Imaging.DocumentViewer.WebDocumentViewerSettingsJS("documentViewerContainer");
// create the document viewer
var docViewer = new Vintasoft.Imaging.DocumentViewer.WebDocumentViewerJS(docViewerSettings);
Here is JavaScript code that demonstrates how to create web document viewer with annotations support:
// create the default web document viewer settings with annotations support
var docViewerSettings = new Vintasoft.Imaging.DocumentViewer.WebDocumentViewerSettingsJS("documentViewerContainer", { annotations: true });
// create the document viewer
var docViewer = new Vintasoft.Imaging.DocumentViewer.WebDocumentViewerJS(docViewerSettings);
When instance of
WebDocumentViewerSettingsJS class is created, the
WebUiControlJS.get_Items function allows to get a collection of UI elements, which are presented in web document viewer by default. The items collection can be changed by adding/moving/deleting of UI element.
Here is JavaScript code that demonstrates how to create web document viewer with annotations support and annotations panel:
// create the default web document viewer settings with annotations support
var docViewerSettings = new Vintasoft.Imaging.DocumentViewer.WebDocumentViewerSettingsJS("documentViewerContainer", { annotations: true });
// create the document viewer
var docViewer = new Vintasoft.Imaging.DocumentViewer.WebDocumentViewerJS(docViewerSettings);
// get items of document viewer
var items = docViewerSettings.get_Items();
// get the main menu of document viewer
var mainMenu = items.getItemByRegisteredId("mainMenu");
// if main menu is found
if (mainMenu != undefined) {
// get items of main menu
var mainMenuItems = mainMenu.get_Items();
// add "Annotation" menu panel
mainMenuItems.addItem("annotationsMenuPanel");
}