Skip to content

Commit 40d591d

Browse files
authored
Merge pull request #6 from dynamsoft-docs/preview
fix bugs
2 parents e189097 + 2fd0045 commit 40d591d

File tree

3 files changed

+40
-17
lines changed

3 files changed

+40
-17
lines changed

programming/javascript/api-reference/capture-vision-router/capture-vision-router-module.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ The APIs for this class include:
7575
| [addResultReceiver()](./multiple-file-processing.md#addresultreceiver) | Adds an object as the receiver of captured results. |
7676
| [removeResultReceiver()](./multiple-file-processing.md#removeresultreceiver) | Removes an object which was added as a receiver of captured results. |
7777
| [addResultFilter()](./multiple-file-processing.md#addresultfilter) | Adds an object as the filter of captured results. |
78+
| [removeResultFilter()](./multiple-file-processing.md#removeresultfilter) | Removes a result filter for filtering non-essential results. |
7879
| [startCapturing()](./multiple-file-processing.md#startcapturing) | Starts to process images consecutively. |
7980
| [stopCapturing()](./multiple-file-processing.md#stopcapturing) | Stops the consecutive process. |
8081

programming/javascript/api-reference/capture-vision-router/instantiate.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ None.
4141
**Code snippet**
4242

4343
```javascript
44-
Dynamsoft.CVR.CaptureVisionRouter.preloadModule(["DBR"]);
44+
Dynamsoft.CVR.CaptureVisionRouter.preloadModule(["DDN"]);
4545
```
4646

4747
## isModuleLoaded
@@ -56,7 +56,7 @@ isModuleLoaded(moduleName: string): boolean;
5656

5757
**Parameter**
5858

59-
`moduleNameIt`: It takes a string representing the module to preload. Valid values for moduleName are 'DBR' (Dynamsoft Barcode Reader), 'DLR' (Dynamsoft Label Recognizer), 'DDN' (Dynamsoft Document Normalizer), and 'DCP' (Dynamsoft Code Parser).
59+
`moduleName`: It takes a string representing the module to preload. Valid values for moduleName are 'DBR' (Dynamsoft Barcode Reader), 'DLR' (Dynamsoft Label Recognizer), 'DDN' (Dynamsoft Document Normalizer), and 'DCP' (Dynamsoft Code Parser).
6060

6161
**Return value**
6262

@@ -65,10 +65,10 @@ A boolean value that indicates whether the required module has been loaded.
6565
**Code snippet**
6666

6767
```javascript
68-
if(router.isModuleLoaded("DBR")){
68+
if(router.isModuleLoaded("DDN")){
6969
// Use the router to perform a DBR job.
7070
} else {
71-
console.log("DBR module is not preloaded.");
71+
console.log("DDN module is not preloaded.");
7272
}
7373
```
7474

programming/javascript/api-reference/capture-vision-router/multiple-file-processing.md

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ breadcrumbText: CVR JavaScript CaptureVisionRouter
1010
permalink: /programming/javascript/api-reference/capture-vision-router/multiple-file-processing.html
1111
---
1212

13-
# CaptureVisionRouterMultiple File Processing
13+
# CaptureVisionRouter Multiple File Processing
1414

1515
| API Name | Description |
1616
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
@@ -21,6 +21,7 @@ permalink: /programming/javascript/api-reference/capture-vision-router/multiple-
2121
| [addResultReceiver()](#addresultreceiver) | Adds an object as the receiver of captured results. |
2222
| [removeResultReceiver()](#removeresultreceiver) | Removes an object which was added as a receiver of captured results. |
2323
| [addResultFilter()](#addresultfilter) | Adds a result filter to the capture process for filtering non-essential results.|
24+
| [removeResultFilter()](#removeresultfilter) | Removes a result filter for filtering non-essential results. |
2425
| [startCapturing()](#startcapturing) | Starts to process images consecutively. |
2526
| [stopCapturing()](#stopcapturing) | Stops the consecutive process. |
2627

@@ -219,10 +220,8 @@ None.
219220
```javascript
220221
cvr = await Dynamsoft.CVR.CaptureVisionRouter.createInstance();
221222
let crr = {
222-
onCapturedResultReceived(result) {
223-
console.log(result);
224-
},
225-
onDecodedBarcodesReceived(result) {
223+
async onDetectedQuadsReceived(result) {
224+
items = result.quadsResultItems;
226225
}
227226
};
228227
cvr.addResultReceiver(crr);
@@ -251,11 +250,8 @@ None.
251250
```javascript
252251
cvr = await Dynamsoft.CVR.CaptureVisionRouter.createInstance();
253252
let crr = {
254-
onCapturedResultReceived(result) {
255-
console.log(result);
256-
},
257-
onDecodedBarcodesReceived(result) {
258-
console.log(result);
253+
async onDetectedQuadsReceived(result) {
254+
items = result.quadsResultItems;
259255
}
260256
};
261257
cvr.addResultReceiver(crr);
@@ -281,8 +277,34 @@ Returns a promise that resolves when the result filter have been successfully ad
281277
**Code snippet**
282278

283279
```javascript
280+
filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter();
284281
cvr = await Dynamsoft.CVR.CaptureVisionRouter.createInstance();
285-
cvr.addResultReceiver(rf);
282+
cvr.addResultReceiver(filter);
283+
```
284+
285+
## removeResultFilter
286+
287+
**Syntax**
288+
289+
```typescript
290+
removeResultFilter(filter: Core.BasicStructures.CapturedResultFilter): void;
291+
```
292+
293+
**parameter**
294+
295+
`filter`: The result filter object to be removed.
296+
297+
**Return Value**
298+
299+
None.
300+
301+
**Code snippet**
302+
303+
```javascript
304+
filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter();
305+
cvr = await Dynamsoft.CVR.CaptureVisionRouter.createInstance();
306+
cvr.addResultReceiver(filter);
307+
cvr.removeResultFilter(filter);
286308
```
287309

288310
## startCapturing
@@ -292,12 +314,12 @@ Starts to process images consecutively.
292314
**Syntax**
293315

294316
```typescript
295-
startCapturing(templateName?: string): void;
317+
startCapturing(templateName?: string): Promise<void>;
296318
```
297319

298320
**parameter**
299321

300-
`templateName (optional)`: The name of the template to use for capturing. If not specified, the default template (`EnumPresetTemplate.PT_DEFAULT`) will be used.
322+
`templateName`(optional): The name of the template to use for capturing. If not specified, the default template (`EnumPresetTemplate.PT_DEFAULT`) will be used.
301323

302324
**Return Value**
303325

0 commit comments

Comments
 (0)