Skip to content
ComPDF

Applying the License Key

If you haven't obtained a license key yet, please refer to How to Obtain a License Key.

Copying the License Key

After obtaining the license key, apply it to your project according to the following steps.

  1. In the email you received, find 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>windows</platform>
<starttime>xxxxxxxx</starttime>
<endtime>xxxxxxxx</endtime>
<key>LICENSE_KEY</key>
</license>
  1. Copy the LICENSE_KEY in the <key>LICENSE_KEY</key> field.

Applying the License Key

You can authenticate in the following way:

csharp
public static bool LicenseVerify()
{
    if (!CPDFGeneration.LoadNativeLibrary())
        return false;
    
    LicenseErrorCode errorCode = CPDFGeneration.LicenseVerify("Input your license here");
    return (verifyResult == LicenseErrorCode.LICENSE_SUCCESS);
}