Dev Center
Table of contents

How to set trial license

You can request a 30-day trial license via the Request a Trial License link.

NOTE

In case the trial license fails to be generated, Dynamsoft Support team will get in touch with you. Or you can contact us.

The following shows how to set the license in the code

  • 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:

Is this page helpful?

YesYes NoNo

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.42
    • 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
  • Documentation Homepage
Change +