Apply the license Key
If you haven't get a license key, please check out how to obtain a license key.
ComPDFKit PDF SDK currently supports two authentication methods to verify license keys: online authentication and offline authentication.
Learn about:
What is the authentication mechanism of ComPDFKit's license?
What are the differences between Online Authentication and Offline Authentication?
Copying the License Key
Accurately obtaining the license key is crucial for the application of the license.
In the email you received, locate the
XML
file containing the license key.Open the
XML
file.
Offline License:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<license version="1">
<platform>linux</platform>
<starttime>xxxxxxxx</starttime>
<endtime>xxxxxxxx</endtime>
<key>LICENSE_KEY</key>
</license>
- Copy the LICENSE_KEY from the
<key>LICENSE_KEY</key>
field.
Apply the License Key
You can contact the ComPDFKit team to obtain a trial license. Before using any ComPDFKit PDF SDK classes, you must perform the following steps to apply the license to your application:
Open your project.
Initialize the license based on your requirements, either through online or offline authentication obtained in the previous step.
Initialize the license as follows:
- Offline license:
NativeKMPDFKit.initialize("LICENSE_KEY", "your deviceId", "", Constants.LIB_DIR_NAME);