Optional initial view options to use when a document is set in a document viewer.
DocumentViewOptions can be used to set optional initial view options to use when a document is set in a DocumentViewer.
Documents are set in the viewer using DocumentViewer.setDocument. During this call, the viewer will check the value of LEADDocument.viewOptions and if it contains a valid value (not null), tries to set up the view initially as indicated by the options in the class as follows:
|pageNumber||If this value is not 0 or 1, the document viewer tries to set the current page number using DocumentViewer.gotoPage.|
|viewLayout||Runs the corresponding
|annotationsUserMode||Runs the corresponding
|viewScrollOffset||Scrolls the view by the specified amount.|
|viewSizeMode||Runs the corresponding
|loadAnnotations||If true, creates the annotations UI elements and tries to load the annotations stored in the document. If false, the annotations UI elements in the viewer are disabled and hidden.|
|loadThumbnails||If true creates the thumbnails UI elements and tries to load the thumbnail of the pages of the document. If false, the thumbnails UI elements in the viewer are disabled and hidden.|
|loadBookmarks||If true creates the bookmarks UI elements and tries to load the bookmarks stored in the document. If false, the bookmarks UI elements in the viewer are disabled and hidden.|
|viewCommands||Additional user defined document viewer commands to run.|
Refer to Document Viewer Commands for more information on the commands.
In all the operations described above, the document viewer performs sanity check on the values before performing the action. For instance, if pageNumber is set to 5 but the document contains only 4 pages, then DocumentViewer.gotoPage is not called and the default page number (1) is viewed instead.
Setting a view options in a document can be performed programmatically or interactively using the document viewer demo.
To create or update the view options programmatically on a LEADDocument:
To create or update the view options interactively using the document viewer demos:
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries