|
| 1 | +--- |
| 2 | +layout: default-layout |
| 3 | +title: How to Enable Specific Barcode Formats with Your License? |
| 4 | +keywords: Dynamsoft Barcode Reader, FAQ, JavaScript, tech basic, barcode format, no license found |
| 5 | +description: When moving from a trial license to a production license, you may encounter the error `[xxx] No license found` if your enabled barcode formats don't match the formats supported by your license? |
| 6 | +needAutoGenerateSidebar: false |
| 7 | +--- |
| 8 | + |
| 9 | +# How to Enable Specific Barcode Formats with Your License |
| 10 | +[<< Back to FAQ index](index.md) |
| 11 | + |
| 12 | +## Problem |
| 13 | +When moving from a trial license to a production license, you may encounter the error `[xxx] No license found` if your enabled barcode formats don't match the formats supported by your license. This occurs because the SDK validates enabled formats against your license's capabilities. |
| 14 | + |
| 15 | +## Solution |
| 16 | +Explicitly enable **only the barcode formats covered by your license** in your code configuration. |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +### Step-by-Step Guide |
| 21 | + |
| 22 | +1. **Check Your License Coverage** |
| 23 | + Confirm which barcode formats your license supports (e.g., QR Code + 1D barcodes). |
| 24 | + |
| 25 | +2. **Configure Barcode Formats** |
| 26 | + Update your code to explicitly enable **only the licensed formats**. |
| 27 | + Example for enabling **QR Code only**: |
| 28 | + |
| 29 | + ```javascript |
| 30 | + let settings = await router.getSimplifiedSettings("ReadSingleBarcode"); |
| 31 | + // Enable QR Code only |
| 32 | + settings.barcodeSettings.barcodeFormatIds = |
| 33 | + Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE; |
| 34 | + await router.updateSettings("ReadSingleBarcode", settings); |
| 35 | + await router.startCapturing("ReadSingleBarcode"); |
| 36 | + |
| 37 | +3. **For Multiple Formats** |
| 38 | + Use bitwise OR (|) to combine formats. Example for enabling QR Code + 1D formats: |
| 39 | + |
| 40 | + ```javascript |
| 41 | + // Enable QR Code only |
| 42 | + settings.barcodeSettings.barcodeFormatIds = |
| 43 | + Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE|Dynamsoft.DBR.EnumBarcodeFormat.BF_ONED; |
| 44 | +
|
| 45 | +4. **Verify Supported Formats** |
| 46 | + View the complete list of supported barcode formats and their corresponding IDs here:[Barcode Format Documentation](https://www.dynamsoft.com/capture-vision/docs/core/enums/barcode-reader/barcode-format.html?lang=js&product=dbr) |
0 commit comments