Skip to content
ComPDF
DemoSampleAPI ReferenceFAQ

PDF Generation Template Editor

Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.

View on GitHub

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?

2.3.1 Copying the License Key

Accurately obtaining the license key is crucial for the application of the license.

  1. In the email you received, locate the XML file containing the license key.

  2. Open the XML file.

Offline License:

xml
<?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>
  1. Copy the LICENSE_KEY from the <key>LICENSE_KEY</key> field.

2.3.2 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:

  1. Open your project.

  2. Initialize the license based on your requirements, either through online or offline authentication obtained in the previous step.

  3. Initialize the license as follows:

  • Offline license:
java
NativeKMPDFKit.initialize("LICENSE_KEY", "your deviceId", "", Constants.LIB_DIR_NAME);