-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathmain.ts
More file actions
30 lines (26 loc) · 820 Bytes
/
Copy pathmain.ts
File metadata and controls
30 lines (26 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { BarcodeResult } from '../..';
import * as dbr from '../../';
dbr.initLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAxLTE2NDk4Mjk3OTI2MzUiLCJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSIsInNlc3Npb25QYXNzd29yZCI6IndTcGR6Vm05WDJrcEQ5YUoifQ==");
async function test() {
try {
let params = {
"ImageParameter": {
"Name": "Custom_143301_827",
"BarcodeFormatIds": [
"BF_ALL"
],
"DeblurLevel": 9,
"ExpectedBarcodesCount": 100,
"ScaleDownThreshold": 1200000,
"Timeout": 100000
},
"Version": "3.0"
};
let template = JSON.stringify(params);
var result: BarcodeResult[] = await dbr.decodeFileAsync('test.tif', dbr.formats.ALL, template);
console.log(result);
} catch (error) {
console.log(error);
}
}
test();