Skip to content

Commit ddda468

Browse files
authored
Merge pull request #423 from yqz5625/main
Update enable-supported-barcode-format.md
2 parents 6e321eb + 67f3c8c commit ddda468

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

programming/javascript/faq/enable-supported-barcode-format.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,26 @@ Explicitly enable **only the barcode formats covered by your license** in your c
2424

2525
2. **Configure Barcode Formats**
2626
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-
```
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+
38+
- Example for Enabling **Multiple Formats**:
39+
40+
Use bitwise OR (|) to combine formats.
41+
```javascript
42+
// Enable QR Code and 1D
43+
settings.barcodeSettings.barcodeFormatIds =
44+
Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE | Dynamsoft.DBR.EnumBarcodeFormat.BF_ONED;
45+
```
46+
4547
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)
48+
49+
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

Comments
 (0)