Skip to content

Commit 6b1d09b

Browse files
authored
Merge branch 'main' into preview
2 parents ede607b + 2018545 commit 6b1d09b

File tree

4 files changed

+74
-1
lines changed

4 files changed

+74
-1
lines changed

programming-old/javascript/samples-demos/helloworld-pwa.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ keywords: javascript, js, barcode, pwa
66
noTitleIndex: true
77
breadcrumbText: PWA
88
permalink: /programming/javascript/samples-demos/helloworld-pwa.html
9+
latestPageUri: https://github.com/Dynamsoft/barcode-reader-javascript-samples/tree/main/hello-world/pwa#readme
910
---
1011

1112
# JavaScript Hello World Sample - PWA
@@ -210,4 +211,4 @@ const appShellFiles = [
210211

211212
## Summary
212213

213-
In this article we took a look at how you can turn a simple barcode reading page into a PWA that is installable, re-engageable and capable of working offline. To learn more about Progressive web apps, you can click [here](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps).
214+
In this article we took a look at how you can turn a simple barcode reading page into a PWA that is installable, re-engageable and capable of working offline. To learn more about Progressive web apps, you can click [here](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps).

programming-old/javascript/samples-demos/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ permalink: /programming/javascript/samples-demos/index.html
3535
Angular (<img alt="Angular logo"
3636
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==" />)</a>
3737
</div>
38+
<div class="file"><a data-balloon-length="xlarge" data-balloon-pos="down" aria-label="Read barcodes from camera and images in a Blazor
39+
Application." class="button title" onclick="linkRedirect('blazor')" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/tree/main/hello-world/blazor">Hello World in
40+
Blazor (<img alt="Blazor logo"
41+
src="data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjIyNDgiIHZpZXdCb3g9Ii0xMC4xMjAyMTg3NSAtNTMuNjA5NTEwMzYgMzM5Ljk1Mzk3NTI5IDM0My4wMjIzNTA5MyIgd2lkdGg9IjI1MDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTMwMy45MzUgODguNDc5Yy02LjU5OCA0MS4zNjItMjcuNjUzIDc5LjA0MS01OS40MiAxMDYuMzM1cy03Mi4xODUgNDIuNDMzLTExNC4wNjQgNDIuNzIzYy04LjQ4My4zMjYtMTYuOTc3LS4xOS0yNS4zNTgtMS41MzlhNzcuNzIzIDc3LjcyMyAwIDAgMSAtNjQuNjMtNzMuMjY2IDc1LjQ3OSA3NS40NzkgMCAwIDEgMjIuMTQtNTIuNzYyIDc1LjQ2IDc1LjQ2IDAgMCAxIDEwNS44ODUtLjc0OCA3NS40NzggNzUuNDc4IDAgMCAxIDIyLjg4NCA1Mi40NDNjLjMxNyAxMi41MS01LjEwMiAyMy40ODMtMTYuMjM5IDIzLjgtMTEuODk5IDAtMTcuNDc3LTguNDkxLTE3LjQ3Ny0xOS45MzR2LTMxLjc5N2ExOS40NzggMTkuNDc4IDAgMCAwIC0xOS4zMjMtMTku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IyLjU1NS4xOTcuODU0YTEwMC45MyAxMDAuOTMgMCAwIDEgLTE1LjYwOCA0NS4xNCAxLjM4NiAxLjM4NiAwIDAgMCAuMTE1IDEuNTExIDEuMzg3IDEuMzg3IDAgMCAwIDEuNDI0LjUwNyAxMDguMTU4IDEwOC4xNTggMCAwIDAgNzUuMTk4LTYyLjAxM2MuMTczLS4yNzcuNDExLS41MDcuNjk1LS42N2ExLjkwMiAxLjkwMiAwIDAgMSAxLjg2OSAwYy4yODQuMTYyLjUyMy4zOTIuNjk0LjY3YTEzNy4wOTggMTM3LjA5OCAwIDAgMSAxMy40NDcgODcuNDMyem0tMTg5Ljk2NCA0NC44NThhMjcuODIzIDI3LjgyMyAwIDAgMCAtMjcuMjkzIDMzLjI1NSAyNy44MyAyNy44MyAwIDAgMCAyMS44NjIgMjEuODY1IDI3LjgyNCAyNy44MjQgMCAwIDAgMzMuMjUxLTI3LjI5NnYtMjUuOTc3YTIuMDA3IDIuMDA3IDAgMCAwIC0xLjkwNC0xLjkwNHoiIGZpbGw9IiM3MDJhZjciLz48L3N2Zz4=" />)</a>
42+
<span id="icon003" class="tooltipIcon"></span>
43+
<a class="github" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/tree/main/hello-world/blazor" title="Check code on GitHub"></a>
44+
</div>
3845
<div class="file"><a data-balloon-length="xlarge" data-balloon-pos="down" aria-label="Decode video stream in a React
3946
Application from a USB-connected or built-in camera (mobile or desktop)." class="button title"
4047
href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/tree/main/hello-world/react">
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
layout: default-layout
3+
title: How to Reduce Duplicate Scans and Optimize Scan Usage
4+
keywords: Dynamsoft Barcode Reader, FAQ, JavaScript, tech basic, scans, duplicate, re-reads
5+
description: How to Reduce Duplicate Scans and Optimize Scan Usage
6+
needAutoGenerateSidebar: false
7+
---
8+
9+
# How to Reduce Duplicate Scans and Optimize Scan Usage?
10+
11+
[<< Back to FAQ index](index.md)
12+
13+
## Version 10
14+
If you're experiencing more scans usage than expected with the barcode reading SDK, use the below strategies to address this issue effectively:
15+
16+
### 1. Donot count identical Result
17+
With version 10 and above of the DBR SDK, the `enableResultDeduplication` is set to forget a result 3 seconds after it is first received. During this time frame, if an identical result appears, it is ignored. If you want to forget the identical result for more duration you can use the setDuplicateForgetTime function as well with `enableResultDeduplication`.
18+
19+
```javascript
20+
// Filter out unchecked and duplicate results.
21+
const filter = new MultiFrameResultCrossFilter();
22+
// Filter out unchecked barcodes
23+
filter.enableResultCrossVerification(
24+
EnumCapturedResultItemType.CRIT_BARCODE,
25+
true
26+
);
27+
// Filter out duplicate barcodes within 3 seconds by default.
28+
filter.enableResultDeduplication(
29+
EnumCapturedResultItemType.CRIT_BARCODE,
30+
true
31+
);
32+
// Filter out duplicate barcodes within 5 seconds.
33+
filter.setDuplicateForgetTime(
34+
EnumCapturedResultItemType.CRIT_BARCODE,
35+
5000
36+
);
37+
await router.addResultFilter(filter);
38+
```
39+
**_NOTE:_** - setSuplicateForgetTime can be set upto 10 seconds.
40+
41+
### 2. Limit Barcode Formats:
42+
If you're specifically scanning a particular barcode format, consider limiting the barcode format options to prevent other formats from being decoded and counted unnecessarily.
43+
44+
you can limit the barcode formats in two ways:
45+
46+
- set the barcode format using the `getSimplifiedSettings`
47+
```javascript
48+
let settings = await router.getSimplifiedSettings("ReadSingleBarcode");
49+
settings.barcodeSettings.barcodeFormatIds =
50+
Dynamsoft.DBR.EnumBarcodeFormat.BF_ONED |
51+
Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE ;
52+
await router.updateSettings("ReadSingleBarcode", settings);
53+
```
54+
55+
- to set the barcode format using the template check out the [template section]({{site.dcv_js_api}}capture-vision-router/settings.html)
56+
57+
58+
Implementing these steps can help streamline your barcode scanning process, reduce unnecessary scans, and optimize resource usage effectively.

programming/javascript/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ The following lines of code is all that is required to create a web page that sc
7878
> ```
7979
8080
After the integration, end users of the web page can open it in a browser, access their cameras and read barcodes directly from the video input.
81+
> We also have an **out-of-the-box** version that achieves the same functionality with only one line of code.
82+
>
83+
> [Easy Barcode Scanner >>](https://github.com/Dynamsoft/easy-barcode-scanner) available for your reference.
84+
> ```js
85+
> // Scan instantly with a single function!
86+
> let txt = await EasyBarcodeScanner.scan();
87+
> ```
8188
8289
### Camera Control
8390

0 commit comments

Comments
 (0)