Skip to content

Commit

Permalink
Merge pull request #782 from lyzhang0113/louie-branch
Browse files Browse the repository at this point in the history
Added FAQ Page Regarding EAN and UPC Addon Codes
  • Loading branch information
DMGithubPublisher authored Dec 12, 2024
2 parents 581b8ac + 592ec59 commit 9ff684d
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
2 changes: 2 additions & 0 deletions faq/general/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ permalink: /faq/general/configuration.html
6. [How to create custom settings template?](custom-settings-template.html)

7. [How can I sort the barcodes of my image in reading order?](sort-barcodes-image.html)

8. [How to Scan EAN/UPC with Addon Codes?](how-to-scan-ean-upc-with-addon.md)
51 changes: 51 additions & 0 deletions faq/general/how-to-scan-ean-upc-with-addon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
layout: default-layout
title: How to Scan EAN/UPC with Addon Codes?
keywords: Dynamsoft Barcode Reader, FAQ, tech basic, EAN-2, EAN-5, UPC–A, Add-On, supplement
description: How to Scan EAN/UPC with Addon Codes?
needAutoGenerateSidebar: false
permalink: /faq/general/how-to-scan-ean-upc-with-addon.html
---

# How to Scan EAN/UPC with Addon Codes?

[<< Back to FAQ index](index.md)

UPC and EAN are barcode formats commonly used for product identification. Both UPC and EAN codes can have supplemental 2-digit or 5-digit barcodes, typically found on the right side of the main code.

Dynamsoft Barcode Reader (DBR) does not enable reading such AddOn Codes with its default templates.

![EAN-13 + EAN-5 on a book](https://www.dynamsoft.com/codepool/img/2024/10/add-on/ean_13.jpg)
![UPC-E + UPC-2 on a magazine](https://www.dynamsoft.com/codepool/img/2024/10/add-on/upc_e.jpg)

In order to read these types of barcodes, the property `EnableAddOnCode` in `BarcodeFormatSpecificationOptions` arrays must be set to `1`.

### Using JSON Templates

You can find all occurrences of `EnableAddOnCode` in your existing template file and set their values to `1` instead of the default `0`.

```json
{
"BarcodeFormatSpecificationOptions": [
{
"EnableAddOnCode": 1, // 1 to Enable AddOn Codes
"Name": "bfs1",
...
},
...
],
...
}
```

### Using JavaScript Code

```javascript
let settings = await cvRouter.outputSettings();
let formatOptionsArray = settings.BarcodeFormatSpecificationOptions;
for (let index = 0; index < formatOptionsArray.length; index++) {
const options = formatOptionsArray[index];
options["EnableAddOnCode"] = 1;
}
```

2 changes: 2 additions & 0 deletions faq/general/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ permalink: /faq/general/index.html

7. [How can I sort the barcodes of my image in reading order?](sort-barcodes-image.md)

8. [How to Scan EAN/UPC with Addon Codes?](how-to-scan-ean-upc-with-addon.md)

## [License & Usage](license-usage.md)

1. [Can the SDK work without internet connection?](sdk-works-without-internet.md)
Expand Down

0 comments on commit 9ff684d

Please sign in to comment.