LEADTOOLS - The World Leader in Imaging SDKs

Documents Library Service

The LEADTOOLS JS Documents Demo Service is used with demonstrations of our SDK with JavaScript and HTML5. An online version of the Document Viewer demo can be found from the LEADTOOLS HTML5 demos page.

XML Comments, in-code, are automatically compiled and available to view at /help. By default, all routing is within the "/api" namespace.


Ping

The status of the service can be checked at api/Test/Ping.


Cache Operations Access

The caching and pre-caching endpoints accessible by this page accept a simple passcode in order to deny unwanted users access to important information. For a true deployed application, consider more advanced security techniques.


Cache

The Document Viewer Service uses a cache system for quicker access to document information. The information below will include pre-cached documents.

Regions
Regions usually represent a document or a conversion / save result.
Items
Items represent some cache entity, such as a document page, thumbnail, OCR result, etc.
Expired Items
Expired Items are those in the cache that are past the expiration set in the .config file.

Pre-Caching

Documents can be pre-cached (using multiple values of maximumImagePixelSize) so that certain data, such as OCR text or SVG images, will be readily available in the client.

The time taken to pre-cache a document scales with the complexity of a document, and for very large files will take minutes.

Pre-cache a document using the input above.

The Pre-Cache list (a cache in itself) can be "cleaned" to remove references to documents that have been deleted from the regular cache.


Development

For a guide to better understanding this project for development, see the development page.


Connecting a Client

This project contains the Documents Service Web Api project only. To use this service, create a client-side application with the LEADTOOLS Document JavaScript Library and connect via the below setup properties (which are specified in the DocumentViewerApp project's serviceConfig.json):

lt.Document.DocumentFactory.serviceHost
The host of the service (including protocol).
Keep it as the default, null, if the host is the same as the client.
lt.Document.DocumentFactory.servicePath
The virtual path from the service's host to the root of the service project.
Keep it as the default, null, if the path is the same as the virtual path from the client app's host to the client app.
lt.Document.DocumentFactory.serviceApiPath
The path to the routing namespace of the Documents Service, which by default is null.
Always specify the value as "api" unless the routing namespace is changed in WebApiConfig.cs.

These properties are processed and (essentially) concatenated to produce the lt.Document.DocumentFactory.serviceUrl used by the client.