Leadtools.LEADVIEW is part of the LEADTOOLS HTML5/JavaScript toolkit. Using the LEADTOOLS LEADVIEW library, you can create a complete, fully-functional DocumentViewer application with as few as 3 lines of code. For an example, see run. LEADVIEW is intended to be fully customizable from configuration files—allowing application modification without having to touch any code at all!
A demo of the LEADVIEW Viewer Application is available at <INSTALLDIR>\Examples\JS\DocumentViewerDemos\LEADVIEW_DocumentViewerDemo
. Before calling any functions within the LEADVIEW library, make sure that your LEADTOOLS license has been set. This can be done by calling the RasterSupport.setLicenseUri method.
<INSTALLDIR>\Bin\JS\pdfjs\
) files must be set up accordingly. The LEADVIEW demo shows how to do this.<INSTALLDIR>\Examples\JS\DocumentViewerDemos\LEADVIEW_DocumentViewerDemo\wwwroot\Resources\Cursors
for annotation cursors. Place any custom cursors there. The LEADVIEW demo also shows how to do this.
The LEADVIEW Viewer library is split into two files: Leadtools.LEADVIEW.js
(at <INSTALLDIR>\Bin\JS\
) and Leadtools.LEADVIEW.css
(at <INSTALLDIR>\Examples\JS\DocumentViewerDemos\LEADVIEW_DocumentViewerDemo\wwwroot\Styles
).
At runtime, LEADVIEW will look for a LEADVIEW.json
file in the <INSTALLDIR>\Examples\JS\DocumentViewerDemos\LEADVIEW_DocumentViewerDemo\wwwroot\LEADVIEW
folder from the web application's root. Set the startupSettings
property in the LEADVIEW.json
file, which tells LEADVIEW where to look for the appropriate settings file. If no valid path is provided, or if LEADVIEW fails to pull the settings, the default settings will be used.
The JSON Settings files can be generated directly from LEADVIEW. Examples of these settings files can be found in the wwwroot\LEADVIEW
directory for the example at
<INSTALLDIR>\Examples\JS\DocumentViewerDemos\LEADVIEW_DocumentViewerDemo
.
At this point, all you need to do to start using LEADVIEW is to run the following 2 lines of code:
let lv = new lt.LEADVIEW.Viewer();
lv.run(null,null);