Skip to content

Apply the license Key

ComPDFKit PDF SDK is a commercial SDK, which requires a license to grant developer permission to release their apps. Each license is only valid for one ApplicationId in development mode. ComPDFKit supports flexible licensing options, please contact our marketing team to know more. However, any documents, sample code, or source code distribution from the released package of ComPDFKit to any third party is prohibited.

Online License: We have introduced an online license mechanism for enhanced license management. Through the online approach, you can manage and update your license more flexibly to meet the specific requirements of your project.

Offline License: In scenarios with high security requirements, no internet connectivity, or offline environments, we provide the option of an offline license. The offline license allows authorization and usage of the ComPDFKit PDF SDK when internet connectivity is not available.

Obtaining the License Key

If you intend to use the ComPDFKit license for your application, we offer two types of licenses: a trial license and a formal license. The formal license requires binding to the unique ApplicationId of your application. ComPDFKit provides two methods to obtain a license, and you can choose either based on your preferences.

Method One:

  1. Initiate contact with our sales team by completing the requirements form on the Contact Sales page of the ComPDFKit official website.
  2. After receiving your submission, our sales team will reach out to you within 24 hours to clarify your requirements.
  3. Upon confirmation of your requirements, you will be issued a complimentary trial license valid for 30 days. Throughout this period, any issues you encounter will be supported with free technical assistance.
  4. If you are satisfied with the product, you have the option to purchase the formal license. Once the transaction is completed, our sales team will send the official license to you via email.

Method Two (Mobile Platforms Only):

  1. Log in to the ComPDFKit official website's Online Sales Interface to submit a trial application and receive an immediate free trial license for iOS platforms, valid for 30 days.
  2. If content with the product, you can directly purchase the formal license on the Online Sales Interface of the official website.
  3. When purchasing the formal license, ensure to bind the license to your application's ApplicationId.
  4. Following a successful payment, the system will automatically email the official license bound to your ApplicationId.
  5. If any issues arise during the online transaction, you can submit your problems through the Technical Support page on the ComPDFKit official website. We will respond to your inquiries within 24 hours, providing free technical support services.

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 and determine the license type through the <type>online</type> field. If present, it is an online license; if absent or <type>offline</type> is present, it is an offline license.

Online License:

xml
xmlCopy code
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<license version="1">
    <platform>android</platform>
    <starttime>xxxxxxxx</starttime>
    <endtime>xxxxxxxx</endtime>
    <type>online</type>
    <key>LICENSE_KEY</key>
</license>

Offline License:

xml
xmlCopy code
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<license version="1">
    <platform>android</platform>
    <starttime>xxxxxxxx</starttime>
    <endtime>xxxxxxxx</endtime>
    <key>LICENSE_KEY</key>
</license>
  1. 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:

  1. Open your project's app/src/main/AndroidManifest.xml file.
  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:
  • Online license:
xml
<!-- Each ComPDFKit license is bound to a specific applicationId -->
<!-- For example: com.compdfkit.pdfviewer -->
<meta-data
    android:name="compdfkit_key_online"
    android:value="Your ComPDFKit Key" />

You can also initialize the ComPDFKit SDK and perform online authentication in your code as follows:

java
CPDFSdk.init(context, "your compdfkit license", false);
  • Offline license:
xml
<!-- Each ComPDFKit license is bound to a specific applicationId -->
<!-- For example: com.compdfkit.pdfviewer -->
<meta-data
    android:name="compdfkit_key"
    android:value="Your ComPDFKit Key" />

You can also initialize the ComPDFKit SDK and perform offline authentication in your code as follows:

java
CPDFSdk.init(context, "your compdfkit license");