Sets the runtime license for LEADTOOLS from a text string and unlocks support for optional features such as LEADTOOLS Imaging Pro, Document, and Medical capabilities.
setLicenseText = function(
licenseText,
developerKey
)
licenseText
String containing the LEADTOOLS runtime license to set.
developerKey
String containing the developer key.
After you have obtained a runtime license and a developer key, you can call RasterSupport.setLicenseUri, RasterSupport.setLicenseBuffer or RasterSupport.setLicenseText at the start of your application to set the license, enable LEADTOOLS and disable the nag message.
You must use this method to set the runtime license for LEADTOOLS and to unlock support for any optional features that you have licensed. If you do not set a RELEASE runtime license, your application will display a nag message dialog at runtime, indicating that you have developed the application without a valid runtime license.
The LEADTOOLS JavaScript license is typically provided in a LEADTOOLS.lic.txt
file and the developer key is typically provided in a LEADTOOLS.lic.key.txt
file.
To set a license successfully, call this method with the following parameters:
Parameter | Value |
---|---|
licenseText | The content of the LEADTOOLS.lic.txt file |
developerKey | The content of the LEADTOOLS.lic.key.txt file |
This method tries to set the license while blocking the application until completion. On errors, exceptions will be thrown with the error information.
In order to obtain a runtime license and a developer key, you must contact LEAD. For more information, refer to About LEADTOOLS Runtime Licenses.
For information about LEADTOOLS Document/Medical capabilities, contact LEAD.
To determine if support for optional features has been unlocked, use rasterSupport.isLocked.
To set the runtime license from a URI, use RasterSupport.setLicenseUri and to set the license from a memory buffer, use RasterSupport.setLicenseBuffer.
NOTE: As an alternative to calling setLicense
, you can specify your runtime license in a folder on the server holding the application. Refer to RasterSupport.licenseDirectory for more information.