Understanding Error -40 in Datalogics Products
Estimated Reading Time: 3 MinutesOverview
Error -40 is a licensing-related error primarily documented in the Adobe PDF Library (APDFL). It surfaces during initialization or activation and prevents the library from running. Other Datalogics products that share the same
There are two known causes of this error in APDFL.
eval.lic / RLM licensing mechanism may also encounter similar licensing errors.There are two known causes of this error in APDFL.
Affected Products
- Adobe PDF Library (APDFL) — primary product where Error -40 is documented
- Other Datalogics products using the
eval.lic/ RLM licensing system (e.g., PDF2IMG) may exhibit similar licensing errors
Cause 1: Activation Failure
This variant of the error presents as:
Error -40 requesting activation
Please contact evalsupport@datalogics.com for further assistance.
This occurs when APDFL is unable to successfully activate, most commonly during evaluation. It has been observed on macOS GitHub Actions CI runners, and intermittently on Windows and Linux as well.
It has also been reported when running large numbers of simultaneous threads (e.g., 99 threads) on an evaluation version of APDFL.
- Ensure a valid license file (
eval.lic) is present and correctly configured (see License File Setup below). - If the error occurs intermittently in CI/CD pipelines, consider staggering workflows to prevent all platforms from hitting the activation server simultaneously.
- Contact Datalogics at evalsupport@datalogics.com if the issue persists.
Cause 2: System Clock Rollback
This variant presents as:
License error: System clock has been set back (-40)
This is triggered when the system clock has been set back, which violates the licensing mechanism used by APDFL, even if the current system time appears correct.
- Verify that the system clock is accurate and has not been manually or automatically adjusted backward.
- Obtain and apply a fresh
eval.licfile from Datalogics support.
License File Setup
In both cases, ensuring the eval.lic file is correctly placed is critical. This applies to APDFL and any other Datalogics product using the RLM licensing system. There are two accepted methods:
Method 1: Place the file in the working directory
- For Adobe C/C++: Place
eval.licin the current working directory when running samples. - For Modern C++: Place
eval.licin the lib directory. - For DLE: Place
eval.licin the directory containingDL180PDFLPINVOKE.dllandcom-datalogics-DL180PDFL.dll.
Method 2: Set the RLM_LICENSE environment variable (recommended)
On Windows:
set RLM_LICENSE=C:\Datalogics\Licenses\eval.lic
On Linux/macOS:
export RLM_LICENSE=/path/to/eval.lic
Additional Notes
- The underlying license error code
0x4000000D(Error Code 13:genErrLicense) is a related license management error that can appear alongside or instead of Error -40 in some APDFL environments. - The
eval.licfile is time-limited and will expire on the date shown inside the file (it is a plaintext file viewable in any text editor). A new license file must be obtained from Datalogics before expiration. This applies to all products using theeval.licsystem. - Other Datalogics products such as PDF Alchemist have documented related license expiry errors (e.g.,
License has expired (-3),No license for product (-1)) using the same licensing infrastructure, suggesting that the RLM licensing system is shared across multiple products.
Contact
For licensing assistance with APDFL or any other Datalogics product, contact us at evalsupport@datalogics.com and/or tech_support@datalogics.com.