All services provide compatible endpoints that are configured to the
~/api/* directory. Therefore, the clients can connect to any of the services by changing the service host or path described below.
fx\DocumentService is a .NET Framework ASP.NET Web API application project that serves as the server-side code for the clients mentioned below. It can be run only on a Windows machine.
core\DocumentService is a .NET Core version of the service that can run on Windows, Linux, and macOS.
DocumentServiceJava is a Java version of the service that can run on Windows, Linux, and macOS.
|Document Viewer Demo||
|Document Compare Demo||
|Document Composer Demo||
|LEADVIEW Document Viewer Demo||
To start using the DocumentViewer, simply open
At any time, right-click the project in Solution Explorer and select Deploy to host the application in IIS on the same machine, a separate machine, or in the cloud. Refer to this article in MSDN for more information.
During development or deployment, you may want to modify
appsettings.json to update the server side options such as the cache directory, OCR engine type, or Raster Codecs options, if needed.
The DocumentFactory class contains the following properties that are needed to set up the client to access the server code:
|ServiceHost||The URL to the service host. The default value is null, which means to use the same host as the client (for example,
|ServicePath||The path from the host to the application root. The default value is null, which means to use the path to the client. By default, the project is set up such that api endpoints directory (
|ServiceApiPath||The path to the api endpoints of the service. The default value is null as explained above, the project is set up such that api endpoints directory (
|ServiceUri||Gets the full URL of the service, concatenating ServiceHost (or the client host if null), ServicePath (or the client path if null), and ServiceApiPath. This means that if no values are set, ServiceUri will be the full path to the client; if we change the ServiceApiPath to
Many methods in
Leadtools.Document.js will send requests to the web service to execute code on the server. Generally, [DocumentFactory.ServiceUserData] can be used to send additional data with any of these requests. [DocumentFactory.PrepareAjax] also allows requests to be modified before sending.
To see exactly what other properties are sent with each request, check the source code of the .NET or Java service. The .NET Web API service includes a documentation module that allows developers to view the API documentation by running the service and navigating to
Developers can also view these same request and response classes by opening the TypeScript declaration files (specifically
Leadtools.Document.d.ts) included in the LEADTOOLS installation and looking for the
lt.Document.Service internal namespace.
|Loading Images in the Document Library|