Skip to content

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:

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. Copy the license key XML file to your own project.

Apply the License Key

You can perform authentication using the following method:

C#
public static bool LicenseVerify()
{
	if (!CPDFSDKVerifier.LoadNativeLibrary())
	{ 
		return false;
	}
	string xmlPath = "The path to your license key XML file";
	LicenseErrorCode status = CPDFSDKVerifier.LicenseVerify(xmlPath);
	return status == LicenseErrorCode.E_LICENSE_SUCCESS;
}