Optional initial view options to use when a document is set in a document viewer.
function lt.Document.DocumentViewOptions
class lt.Document.DocumentViewOptions()
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:
Member | Action |
---|---|
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 Layout.* command. |
annotationsUserMode | Runs the corresponding Annotations.UserMode* command. |
viewZoomPercent | Runs the View.ZoomPercentage command with the specified percentage. |
viewScrollOffset | Scrolls the view by the specified amount. |
viewSizeMode | Runs the corresponding View.ActualSize , View.FitWidth or View.FitPage command. |
viewItemType | Runs the View.ItemType with the specified mode. |
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:
Now, when this document is loaded into a DocumentViewer using setDocument, the view options are parsed and the commands are performed.
To create or update the view options interactively using the document viewer demos:
Now, when this document is loaded into a DocumentViewer using setDocument, the view options are parsed and the commands are performed.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document