What do I do with a "Bad License Key" error?
If you see an error that says:
Bad License Key.
PDFNet SDK will work in demo mode.
For more information please see PDFNet FAQ or contact support [at] pdftron.com.It means that the license key may have been copied incorrectly.
Please verify the following:
Please make sure you’re using the entire key string, but with no extra whitespace included (i.e. at the end, which can happen when you copy/paste out of an email or the website).For example if your key is "
YOUR APRYSE LICENSE KEY::Testing::123", then you would call:
pdftron.PDFNet.Initialize("YOUR APRYSE LICENSE KEY::Testing::123");PDFNet::Initialize("YOUR APRYSE LICENSE KEY::Testing::123");PDFNet.initialize("YOUR APRYSE LICENSE KEY::Testing::123");// Use runWithCleanup instead of initialize
// PDFNet initialize is called within runWithCleanup
// runWithCleanup will also perform automatic memory management
PDFNet.runWithCleanup(callback, "YOUR APRYSE LICENSE KEY::Testing::123");
// Optional alternative to call initialize directly
PDFNet.initialize("YOUR APRYSE LICENSE KEY::Testing::123");[PTPDFNet Initialize:@"YOUR APRYSE LICENSE KEY::Testing::123"];PTPDFNet.initialize("YOUR APRYSE LICENSE KEY::Testing::123")PDFNet::Initialize("YOUR APRYSE LICENSE KEY::Testing::123");PDFNet.Initialize("YOUR APRYSE LICENSE KEY::Testing::123")PDFNet.Initialize("YOUR APRYSE LICENSE KEY::Testing::123")Make sure you are running on the licensed OS/platform.License keys are not interchangeable between platforms. They are uniquely created based on your license and the platform specified.
Also, this needs to be in the
firstinstance of PDFNetinitialize, and there should be only one call to PDFNetinitialize.If the license key is used in other calls to initialize besides the first then it will not work because PDFNet will already be loaded in demo mode which cannot be changed by anotherinitializecall.Beforeany other calls toPDFNetfunctions, you must call PDFNetinitialize.Initialize is required to load up the required parts of PDFNet that are used across all other PDFNet methods. The initialize method can be called multiple times but will only be activated the first time.
Last updated
Was this helpful?