Dev Center
Table of contents

Thanks for downloading Dynamsoft Barcode Reader Package!

Your download will start shortly. If your download does not begin, click here to retry.

How to set full license in version 9.x

You can set the license by following the steps below:

Activate the license

Once you purchase a full license from Dynamsoft, you can find your license information in the Customer Portal (License | Full License).

To activate the license, click “Activate”.

Activate

On the next page, set an Alias for your license or leave the default Alias, choose where you want the license to be hosted (“Dynamsoft’s License Server” or “My Self-Hosted License Server”) and click the “Activate” button.

Activate2

  1. Alias is a way to identify the license. You can set a meaningful Alias to a license so that you can easily identify the purpose of the license.

  2. In most cases, you should choose “Dynamsoft’s License Server”, choose “My Self-Hosted License Server” only when you have consulted us.

  3. You might be prompted to add the new license to an existing project or create a new project for this license.

On the following popup window, click the “OK” button.

Activate3

You will find that the License Key is listed on the license details page now.

Activate5

You can copy the License Key and use it in your application.

If you have other new licenses, you can follow the same steps to activate them.

A license usually expires one year after it is activated. Do not activate the license until you actually need to use it.

Configure the license by projects (optional)

If you have multiple projects which you want to manage the license usage separately, you can click the project name (found after “Linked Project Name”) on the license details page to get to the configuration page. Read how to manage the project for more information.

Set the license in the code

Replace the trial license with the purchased license key:

  • JavaScript
  • C
  • C++
  • C#
  • Java
  • Android
  • Objective-C
  • Swift
  • Python
Dynamsoft.DBR.BarcodeScanner.license = "YOUR-LICENSE-KEY";
let scanner = await Dynamsoft.DBR.BarcodeScanner.createInstance();
int errorCode = 0;
char errorBuf[512];
errorCode = DBR_InitLicense("YOUR-LICENSE-KEY", errorBuf, 512);
if (errorCode != DBR_OK)
{
    // Add your code for license error processing;
}
// ...
void* dbr = DBR_GetInstance();
if(dbr != NULL)
{
    // Add your code here to call decoding method, process barcode results and so on
    // ...
    // Release the allocated resources for the instance
    DBR_RecycleInstance(dbr);
}
int errorCode = 0;
char errorBuf[512];
errorCode = CBarcodeReader::InitLicense("YOUR-LICENSE-KEY", errorBuf, 512);
if (errorCode != DBR_OK)
{
    // Add your code for license error processing;
}
// ...
CBarcodeReader* dbr = CBarcodeReader::GetInstance();
if(dbr != NULL)
{
    // Add your code here to call decoding method, process barcode results and so on
    // ...
    // Release the allocated resources for the instance
    dbr->Recycle();
}
string errorMsg;
EnumErrorCode errorCode = BarcodeReader.InitLicense("YOUR-LICENSE-KEY", out errorMsg);
if (errorCode != EnumErrorCode.DBR_SUCCESS)
{
    // Add your code for license error processing;
}
// ...
BarcodeReader reader = BarcodeReader.GetInstance();
if (reader != null)
{
    // Add your code here to call decoding method, process barcode results and so on
    // ...
    // Release the allocated resources for the instance
    reader.Recycle();
}
try {
    BarcodeReader.initLicense("YOUR-LICENSE-KEY");
    // ...
    BarcodeReader reader = BarcodeReader.getInstance();
    if(reader != null)
    {
        // Add your code here to call decoding method, process barcode results and so on
        // ...
        // Release the allocated resources for the instance
        reader.recycle();
    }
} catch (BarcodeReaderException ex) {
    // ...
}
BarcodeReader.initLicense("YOUR-LICENSE-KEY", new DBRLicenseVerificationListener() {
  @Override
  public void DBRLicenseVerificationCallback(boolean isSuccessful, Exception e) {
    // Add your code for license verification.
  }
});
[DynamsoftBarcodeReader initLicense:@"YOUR-LICENSE-KEY" verificationDelegate:self];
- (void)DBRLicenseVerificationCallback:(bool)isSuccess error:(NSError *)error
{
  // Add your code for license verification.
}
DynamsoftBarcodeReader.initLicense("YOUR-LICENSE-KEY", verificationDelegate: self)
func dbrLicenseVerificationCallback(_ isSuccess: Bool, error: Error?)
{
  // Add your code for license verification.
}
error = BarcodeReader.init_license("YOUR-LICENSE-KEY")
if error[0] != EnumErrorCode.DBR_OK:
    # Add your code for license error processing
# ...
reader = BarcodeReader.get_instance()
if reader != None:
    # Add your code here to call decoding method, process barcode results and so on
    # ...
    # Release the allocated resources for the instance
    reader.recycle()

If you run into any issues, please contact Dynamsoft Support.

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

  • Latest version
  • Version 10.x
    • Version 10.2.0
    • Version 10.0.21
    • Version 10.0.20
    • Version 10.0.10
    • Version 10.0.0
  • Version 9.x
    • Version 9.6.40
    • Version 9.6.33
    • Version 9.6.32
    • Version 9.6.31
    • Version 9.6.30
    • Version 9.6.20
    • Version 9.6.10
    • Version 9.6.0
    • Version 9.4.0
    • Version 9.2.0
    • Version 9.0.0
  • Version 8.x
    • Version 8.8.0
    • Version 8.6.0
    • Version 8.4.0
    • Version 8.2.0
    • Version 8.1.2
    • Version 8.1.0
    • Version 8.0.0
  • Version 7.x
    • Version 7.6.0
    • Version 7.5.0
Change +