LibreOffice Instance Manager (LIM)
The LibreOffice Instance Manager (LIM) is a service that runs in the background and handles all the communication between ImageGear and LibreOffice.
When ImageGear needs to load or display a Word, Excel, or PowerPoint document, ImageGear sends a request to LibreOffice to get the data it needs. The user does not need to write code to deal with the LIM since we manage that for you. Instead, we have exposed several variables you can adjust to your requirement.
These variables can be set by creating a settings.json file or by editing the settings-example.json file and renaming it to settings.json. This file should be in the LIM directory which will be $INSTALLDIR\Bin\[x86,x64]\OfficeCore\lim.
- maxTotalInstances – Specifies the maximum number of instances of LibreOffice that can be running at one time.
- maxAvailInstances – Specifies the maximum number of instances that will be available to service requests from ImageGear at any given time without exceeding the limit set by “maxTotalInstances”.
- minAvailInstances – Specifies the minimum number of instances of LibreOffice that can be running at one time without exceeding the limit set by “maxTotalInstances”.
- logFolderLocation – The location to which logs shall be written.
- idleTimeout – The number of seconds to wait if the LIM is not being used, before shutting it down.
File path variables (e.g., logFolderLocation, libreOfficeLocation, etc.) can take in System Environment Variables (e.g., %TEMP%). For example:
|
Copy Code |
{
"maxTotalInstances":10,
"maxAvailInstances":5,
"minAvailInstances":2,
"logFolderLocation":"%TEMP%/limlogs",
"libreOfficeLocation":"D:\\some_path\\libreoffice",
"idleTimeout":180
} |
When running samples from Visual Studio versions 2015 and older, we recommend disabling the 'Enable the Visual Studio hosting process' option.