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.