aspose.barcode 20.6.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3616 @@
1
+ const fs = require("fs");
2
+ const java = require('java');
3
+ const joint = require("./Joint");
4
+
5
+ /**
6
+ * BarCodeReader encapsulates an image which may contain one or several barcodes, it then can perform ReadBarCodes operation to detect barcodes.
7
+ * @example
8
+ * //This sample shows how to detect Code39 and Code128 barcodes.
9
+ * let reader = new BarCodeReader("test.png", null, [DecodeType.CODE_39_STANDARD, DecodeType.CODE_128]);
10
+ * reader.readBarCodes().forEach(function(result, i, results)
11
+ * {
12
+ * console.log("BarCode Type: " + result.getCodeTypeName());
13
+ * console.log("BarCode CodeText: " + result.getCodeText());
14
+ * });
15
+ */
16
+ class BarCodeReader extends joint.BaseJavaClass
17
+ {
18
+ qualitySettings;
19
+ recognizedResults;
20
+ barcodeSettings;
21
+
22
+ static get javaClassName()
23
+ {
24
+ return "com.aspose.mw.barcode.recognition.MwBarCodeReader";
25
+ }
26
+
27
+ /**
28
+ * Initializes a new instance of the BarCodeReader<br>
29
+ * @param image encoded as base64 string or path to image
30
+ * @param rectangles array of object by type Rectangle
31
+ * @param decodeTypes the array of objects by DecodeType
32
+ */
33
+ constructor(image, rectangles, decodeTypes)
34
+ {
35
+ if(image != null)
36
+ {
37
+ if (joint.isPath(image))
38
+ {
39
+ image = joint.convertResourceToBase64String(image);
40
+ }
41
+ }
42
+ if (rectangles != null)
43
+ {
44
+ if (!Array.isArray(rectangles))
45
+ {
46
+ rectangles = [rectangles.toString()];
47
+ }
48
+ else
49
+ {
50
+ for (let i = 0; i < rectangles.length; i++)
51
+ {
52
+ rectangles[i] = rectangles[i].toString();
53
+ }
54
+ }
55
+ }
56
+ if (decodeTypes != null)
57
+ {
58
+ if (!Array.isArray(decodeTypes))
59
+ {
60
+ decodeTypes = [decodeTypes];
61
+ }
62
+ for (let i = 0; i < decodeTypes.length; i++)
63
+ {
64
+ decodeTypes[i] = decodeTypes[i] + "";
65
+ }
66
+ }
67
+ try
68
+ {
69
+ let java_class_link = new java.import(BarCodeReader.javaClassName);
70
+ let java_class = null;
71
+ if(image == null && rectangles == null && image == null)
72
+ java_class = new java_class_link();
73
+ else
74
+ java_class = new java_class_link(image, rectangles, decodeTypes);
75
+ super(java_class);
76
+ this.init()
77
+ } catch (e)
78
+ {
79
+ console.error("Invalid arguments");
80
+ throw e;
81
+ }
82
+ }
83
+
84
+ static construct(javaClass)
85
+ {
86
+ let barcodeReader = new BarCodeReader(null, null, null);
87
+ barcodeReader.setJavaClass(javaClass);
88
+ return barcodeReader;
89
+ }
90
+
91
+ /**
92
+ * Determines whether any of the given decode types is included into<br>
93
+ * @param ...decodeTypes Types to verify.
94
+ * @return bool Value is a true if any types are included into.
95
+ */
96
+ containsAny(...decodeTypes)
97
+ {
98
+ for (let i = 0; i < decodeTypes.length; i++)
99
+ {
100
+ decodeTypes[i] = decodeTypes[i] + "";
101
+ }
102
+ return this.getJavaClass().containsAnySync(decodeTypes);
103
+ }
104
+
105
+ static convertToString(arg)
106
+ {
107
+ if (is_int(arg))
108
+ {
109
+ return strval(arg);
110
+ }
111
+ else if (arg instanceof Rectangle)
112
+ {
113
+ return "{[" + arg.toString() + "]}";
114
+ }
115
+ else if (is_array(arg))
116
+ {
117
+ let areasString = "{";
118
+
119
+ for (let i = 0; i < sizeof(arg); i++)
120
+ {
121
+ areasString += "[" + arg[i].toString() + "]";
122
+ }
123
+
124
+ areasString += "}";
125
+
126
+ return areasString;
127
+ }
128
+ else
129
+ {
130
+ return arg;
131
+ }
132
+ }
133
+
134
+ init()
135
+ {
136
+ this.qualitySettings = new QualitySettings(this.getJavaClass().getQualitySettingsSync());
137
+ this.barcodeSettings = BarcodeSettings.construct(this.getJavaClass().getBarcodeSettingsSync());
138
+ }
139
+
140
+ /**
141
+ * Gets the timeout of recognition process in milliseconds.<br>
142
+ *@example
143
+ * let reader = new BarCodeReader("test.png", null, null);
144
+ * reader.setTimeout(5000);
145
+ * reader.readBarCodes().forEach(function(result, i, results)
146
+ * {
147
+ * console.log("BarCode CodeText: " + result.getCodeText());
148
+ * });
149
+ * @return The timeout.
150
+ */
151
+ getTimeout()
152
+ {
153
+ return this.getJavaClass().getTimeoutSync();
154
+ }
155
+
156
+ /**
157
+ * Sets the timeout of recognition process in milliseconds.
158
+ *@example
159
+ * let reader = new BarCodeReader("test.png", null, null);
160
+ * reader.setTimeout(5000);
161
+ * reader.readBarCodes().forEach(function(result, i, results)
162
+ * {
163
+ * console.log("BarCode CodeText: " + result.getCodeText());
164
+ * });
165
+ * @param value The timeout.
166
+ */
167
+ setTimeout(value)
168
+ {
169
+ this.getJavaClass().setTimeoutSync(value);
170
+ }
171
+
172
+ /**
173
+ * Enable checksum validation during recognition for 1D barcodes.<br>
174
+ * Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible.<br>
175
+ * Checksum never used: Codabar<br>
176
+ * Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, <br>
177
+ * Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN<br>
178
+ * Checksum always used: Rest symbologies<br>
179
+ *
180
+ * @example
181
+ * //This sample shows influence of ChecksumValidation on recognition quality and results
182
+ *
183
+ * let generator = new BarcodeGenerator(EncodeTypes.EAN_13, "1234567890128");
184
+ * generator.save("test.png");
185
+ * let reader = new BarCodeReader("test.png", null, DecodeType.EAN_13);
186
+ * //checksum disabled
187
+ * reader.setChecksumValidation(ChecksumValidation.OFF);
188
+ * reader.readBarCodes().forEach(function(result, i, results)
189
+ * {
190
+ * console.log("BarCode CodeText: " + result.getCodeText());
191
+ * console.log("BarCode Value: " + result.getExtended().getOneD().getValue());
192
+ * console.log("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
193
+ * });
194
+ * let reader = new BarCodeReader("test.png", null, DecodeType.EAN_13);
195
+ * //checksum enabled
196
+ * reader.setChecksumValidation(ChecksumValidation.ON);
197
+ * reader.readBarCodes().forEach(function(result, i, results)
198
+ * {
199
+ * console.log("BarCode CodeText: " + result.getCodeText());
200
+ * console.log("BarCode Value: " + result.getExtended().getOneD().getValue());
201
+ * console.log("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
202
+ * });
203
+ *
204
+ * The checksum validation flag.
205
+ */
206
+ getChecksumValidation()
207
+ {
208
+ return this.getJavaClass().getChecksumValidationSync();
209
+ }
210
+
211
+ /**
212
+ *
213
+ * Enable checksum validation during recognition for 1D barcodes.<br>
214
+ * Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible.<br>
215
+ * Checksum never used: Codabar<br>
216
+ * Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN<br>
217
+ * Checksum always used: Rest symbologies<br>
218
+ *@example
219
+ * This sample shows influence of ChecksumValidation on recognition quality and results
220
+ *
221
+ * let generator = new BarcodeGenerator(EncodeTypes.EAN_13, "1234567890128");
222
+ * generator.save("test.png");
223
+ * let reader = new BarCodeReader("test.png", null, DecodeType.EAN_13);
224
+ * //checksum disabled
225
+ * reader.setChecksumValidation(ChecksumValidation.OFF);
226
+ * reader.readBarCodes().forEach(function(result, i, results)
227
+ * {
228
+ * console.log("BarCode CodeText: " + result.getCodeText());
229
+ * console.log("BarCode Value: " + result.getExtended().getOneD().getValue());
230
+ * console.log("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
231
+ * });
232
+ * let reader = new BarCodeReader("test.png", null, DecodeType.EAN_13);
233
+ * //checksum enabled
234
+ * reader.setChecksumValidation(ChecksumValidation.ON);
235
+ * reader.readBarCodes().forEach(function(result, i, results)
236
+ * {
237
+ * console.log("BarCode CodeText: " + result.getCodeText());
238
+ * console.log("BarCode Value: " + result.getExtended().getOneD().getValue());
239
+ * console.log("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
240
+ * });
241
+ *
242
+ * The checksum validation flag.
243
+ */
244
+ setChecksumValidation(value)
245
+ {
246
+ this.getJavaClass().setChecksumValidationSync(value);
247
+ }
248
+
249
+ /**
250
+ * Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.
251
+ *@example
252
+ * //This sample shows how to strip FNC characters<br>
253
+ *
254
+ * let generator = new BarcodeGenerator(EncodeTypes.GS1Code128, "(02)04006664241007(37)1(400)7019590754");
255
+ * generator.save("test.png");
256
+ * let reader = new BarCodeReader("test.png", null, DecodeType.CODE_128);
257
+ * //StripFNC disabled
258
+ * reader.setStripFNC(false);
259
+ * reader.readBarCodes().forEach(function(result, i, results)
260
+ * {
261
+ * console.log("BarCode CodeText: " + result.getCodeText());
262
+ * });
263
+ * let reader = new BarCodeReader("test.png", null, DecodeType.CODE_128);
264
+ * //StripFNC enabled
265
+ * reader.setStripFNC(true);
266
+ * reader.readBarCodes().forEach(function(result, i, results)
267
+ * {
268
+ * console.log("BarCode CodeText: " + result.getCodeText());
269
+ * });
270
+ */
271
+ getStripFNC()
272
+ {
273
+ return this.getJavaClass().getStripFNCSync();
274
+ }
275
+
276
+ /**
277
+ * Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.
278
+ *@example
279
+ * //This sample shows how to strip FNC characters
280
+ *
281
+ * let generator = new BarcodeGenerator(EncodeTypes.GS1Code128, "(02)04006664241007(37)1(400)7019590754");
282
+ * generator.save("test.png");
283
+ * let reader = new BarCodeReader("test.png", null, DecodeType.CODE_128);
284
+ * //StripFNC disabled
285
+ * reader.setStripFNC(false);
286
+ * reader.readBarCodes().forEach(function(result, i, results)
287
+ * {
288
+ * console.log("BarCode CodeText: " + result.getCodeText());
289
+ * });
290
+ * let reader = new BarCodeReader("test.png", null, DecodeType.CODE_128);
291
+ * //StripFNC enabled
292
+ * reader.setStripFNC(true);
293
+ * reader.readBarCodes().forEach(function(result, i, results)
294
+ * {
295
+ * console.log("BarCode CodeText: " + result.getCodeText());
296
+ * });
297
+ *
298
+ */
299
+ setStripFNC(value)
300
+ {
301
+ this.getJavaClass().setStripFNCSync(value);
302
+ }
303
+
304
+ /**
305
+ * Gets the Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.OTHER.
306
+ */
307
+ getCustomerInformationInterpretingType()
308
+ {
309
+ return this.getJavaClass().getCustomerInformationInterpretingTypeSync();
310
+ }
311
+
312
+ /**
313
+ * Sets the Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.OTHER.
314
+ */
315
+ setCustomerInformationInterpretingType(value)
316
+ {
317
+ this.getJavaClass().setCustomerInformationInterpretingTypeSync(value);
318
+ }
319
+
320
+ abort()
321
+ {
322
+ this.getJavaClass().abortSync();
323
+ }
324
+
325
+ /**
326
+ * Gets recognized BarCodeResult array
327
+ * @example
328
+ * //This sample shows how to read barcodes with BarCodeReader
329
+ * let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
330
+ * reader.readBarCodes();
331
+ * for(let i = 0; reader.getFoundCount() > i; ++i)
332
+ * console.log("BarCode CodeText: " + reader.getFoundBarCodes()[i].getCodeText());
333
+ *
334
+ * @return recognized BarCodeResult array
335
+ */
336
+ getFoundBarCodes()
337
+ {
338
+ return this.recognizedResults;
339
+ }
340
+
341
+ /**
342
+ * Gets recognized barcodes count
343
+ * @example
344
+ * //This sample shows how to read barcodes with BarCodeReader
345
+ * let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
346
+ * reader.readBarCodes();
347
+ * for(let i = 0; reader.getFoundCount() > i; ++i)
348
+ * console.log("BarCode CodeText: " + reader.getFoundBarCodes()[i].getCodeText());
349
+ * Value: The recognized barcodes count
350
+ */
351
+ getFoundCount()
352
+ {
353
+ return this.getJavaClass().getFoundCountSync();
354
+ }
355
+
356
+ /**
357
+ * Reads BarCodeResult from the image.
358
+ * @example
359
+ * //This sample shows how to read barcodes with BarCodeReader
360
+ * let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
361
+ * reader.readBarCodes().forEach(function(result, i, results)
362
+ * {
363
+ * console.log("BarCode CodeText: " + result.getCodeText());
364
+ * });
365
+ * let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
366
+ * reader.readBarCodes();
367
+ * for(let i = 0; reader.getFoundCount() > i; ++i)
368
+ * console.log("BarCode CodeText: " + reader.getFoundBarCodes()[i].getCodeText());
369
+ * @return Returns array of recognized {@code BarCodeResult}s on the image. If nothing is recognized, zero array is returned.
370
+ */
371
+ readBarCodes()
372
+ {
373
+ try
374
+ {
375
+ this.recognizedResults = [];
376
+ let javaReadBarcodes = this.getJavaClass().readBarCodesSync();
377
+ for (let i = 0; i < javaReadBarcodes.length; i++)
378
+ {
379
+ this.recognizedResults[i] = new BarCodeResult(javaReadBarcodes[i]);
380
+ }
381
+ return this.recognizedResults;
382
+ }
383
+ catch (e)
384
+ {
385
+ if((e.toString().includes("RecognitionAbortedException")))
386
+ {
387
+ throw new RecognitionAbortedException(e.toString(), null);
388
+ }
389
+ throw e;
390
+ }
391
+ }
392
+
393
+ /**
394
+ * QualitySettings allows to configure recognition quality and speed manually.
395
+ * You can quickly set up QualitySettings by embedded presets: HighPerformance, NormalQuality,
396
+ * HighQuality, MaxBarCodes or you can manually configure separate options.
397
+ * Default value of QualitySettings is NormalQuality.
398
+ * @return QualitySettings to configure recognition quality and speed.
399
+ *
400
+ * @example
401
+ * //This sample shows how to use QualitySettings with BarCodeReader
402
+ *
403
+ * let reader = new BarCodeReader("test.png", null, null);
404
+ * //set high performance mode
405
+ * reader.setQualitySettings(QualitySettings.getHighPerformance());
406
+ * reader.readBarCodes().forEach(function(result, i, results)
407
+ * {
408
+ * console.log("BarCode CodeText: " + result.getCodeText());
409
+ * });
410
+ * let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
411
+ * //normal quality mode is set by default
412
+ * reader.readBarCodes().forEach(function(result, i, results)
413
+ * {
414
+ * console.log("BarCode CodeText: " + result.getCodeText());
415
+ * });
416
+ * let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
417
+ * //set high performance mode
418
+ * reader.setQualitySettings(QualitySettings.getHighPerformance());
419
+ * //set separate options
420
+ * reader.getQualitySettings().setAllowMedianSmoothing(true);
421
+ * reader.getQualitySettings().setMedianSmoothingWindowSize(5);
422
+ * reader.readBarCodes().forEach(function(result, i, results)
423
+ * {
424
+ * console.log("BarCode CodeText: " + result.getCodeText());
425
+ * });
426
+ *
427
+ */
428
+ getQualitySettings()
429
+ {
430
+ return this.qualitySettings;
431
+ }
432
+
433
+ /**
434
+ * QualitySettings allows to configure recognition quality and speed manually.
435
+ * You can quickly set up QualitySettings by embedded presets: HighPerformance, NormalQuality,
436
+ * HighQuality, MaxBarCodes or you can manually configure separate options.
437
+ * Default value of QualitySettings is NormalQuality.
438
+ *
439
+ * @example
440
+ * //This sample shows how to use QualitySettings with BarCodeReader
441
+ * let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
442
+ * //set high performance mode
443
+ * reader.setQualitySettings(QualitySettings.getHighPerformance());
444
+ * reader.readBarCodes().forEach(function(result, i, results)
445
+ * {
446
+ * console.log("BarCode CodeText: " + result.getCodeText());
447
+ * });
448
+ * let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
449
+ * //normal quality mode is set by default
450
+ * reader.readBarCodes().forEach(function(result, i, results)
451
+ * {
452
+ * console.log("BarCode CodeText: " + result.getCodeText());
453
+ * });
454
+ * let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
455
+ * //set high performance mode
456
+ * reader.setQualitySettings(QualitySettings.getHighPerformance());
457
+ * //set separate options
458
+ * reader.getQualitySettings().setAllowMedianSmoothing(true);
459
+ * reader.getQualitySettings().setMedianSmoothingWindowSize(5);
460
+ * reader.readBarCodes().forEach(function(result, i, results)
461
+ * {
462
+ * console.log("BarCode CodeText: " + result.getCodeText());
463
+ * });
464
+ * QualitySettings to configure recognition quality and speed.
465
+ */
466
+ setQualitySettings(value)
467
+ {
468
+ this.getJavaClass().setQualitySettingsSync(value.getJavaClass());
469
+ }
470
+
471
+ /**
472
+ * The main BarCode decoding parameters. Contains parameters which make influence on recognized data.
473
+ * @return The main BarCode decoding parameters
474
+ */
475
+ getBarcodeSettings()
476
+ {
477
+ return this.barcodeSettings;
478
+ }
479
+
480
+ /**
481
+ * A flag which force engine to detect codetext encoding for Unicode codesets.
482
+ * @example
483
+ * // This sample shows how to detect text encoding on the fly if DetectEncoding is enabled
484
+ * image = "image.png";
485
+ * let generator = new BarcodeGenerator(EncodeTypes.QR, "Đ¿Ñ—Đ…Đ¿Ñ—Đ…Đ¿Ñ—Đ…Đ¿Ñ—Đ…Đ¿Ñ—Đ…"))
486
+ * generator.getParameters().getBarcode().getQR().setCodeTextEncoding("UTF-8");
487
+ * generator.save(image, BarCodeImageFormat.getPng());
488
+ * //detects encoding for Unicode codesets is enabled
489
+ * let reader = new BarCodeReader(image, null, DecodeType.QR);
490
+ * reader.setDetectEncoding(true);
491
+ * reader.readBarCodes().forEach(function(result, i, results)
492
+ * {
493
+ * console.log("BarCode CodeText: " + result.getCodeText());
494
+ * });
495
+ * //detect encoding is disabled
496
+ * let reader = new BarCodeReader(image, null, DecodeType.QR);
497
+ * reader.setDetectEncoding(false);
498
+ * reader.readBarCodes().forEach(function(result, i, results)
499
+ * {
500
+ * console.log("BarCode CodeText: " + result.getCodeText());
501
+ * });
502
+ */
503
+ getDetectEncoding()
504
+ {
505
+ return this.getJavaClass().getDetectEncodingSync();
506
+ }
507
+
508
+ /**
509
+ * A flag which force engine to detect codetext encoding for Unicode codesets.
510
+ * @example
511
+ * //This sample shows how to detect text encoding on the fly if DetectEncoding is enabled
512
+ * let image = "image.png";
513
+ * let generator = new BarcodeGenerator(EncodeTypes.QR, "Đ¿Ñ—Đ…Đ¿Ñ—Đ…Đ¿Ñ—Đ…Đ¿Ñ—Đ…Đ¿Ñ—Đ…");
514
+ * generator.getParameters().getBarcode().getQR().setCodeTextEncoding("UTF-8");
515
+ * generator.save(image, BarCodeImageFormat.getPng());
516
+ * //detects encoding for Unicode codesets is enabled
517
+ * let reader = new BarCodeReader(image, null, DecodeType.QR);
518
+ * reader.setDetectEncoding(true);
519
+ * reader.readBarCodes().forEach(function(result, i, results)
520
+ * {
521
+ * console.log("BarCode CodeText: " + result.getCodeText());
522
+ * });
523
+ * //detect encoding is disabled
524
+ * let reader = new BarCodeReader(image, null, DecodeType.QR);
525
+ * reader.setDetectEncoding(true);
526
+ * reader.readBarCodes().forEach(function(result, i, results)
527
+ * {
528
+ * console.log("BarCode CodeText: " + result.getCodeText());
529
+ * });
530
+ */
531
+ setDetectEncoding(value)
532
+ {
533
+ this.getJavaClass().setDetectEncodingSync(value);
534
+ }
535
+
536
+ /**
537
+ * Sets bitmap image and areas for recognition.
538
+ * Must be called before ReadBarCodes() method.
539
+ * @example
540
+ * //This sample shows how to detect Code39 and Code128 barcodes.
541
+ * let bmp = "test.png";
542
+ * let reader = new BarCodeReader();
543
+ * reader.setBarCodeReadType([ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
544
+ * var img = new Image();
545
+ * img.src = 'path_to_image';
546
+ * width = img.width;
547
+ * height = img.height;
548
+ * reader.setBarCodeImage(bmp, new Rectangle[] { new Rectangle(0, 0, width, height) });
549
+ * reader.readBarCodes().forEach(function(result, i, results)
550
+ * {
551
+ * console.log("BarCode Type: " + result.getCodeTypeName());
552
+ * console.log("BarCode CodeText: " + result.getCodeText());
553
+ * });
554
+ * @param value The bitmap image for recognition.
555
+ * @param areas areas list for recognition
556
+ * @throws BarcodeException
557
+ */
558
+ setBarCodeImage(image, ...areas)
559
+ {
560
+ image = joint.convertResourceToBase64String(image);
561
+ let stringAreas = [];
562
+ let isAllRectanglesNotNull = false;
563
+ if (!(areas == null) && areas.length > 0)
564
+ {
565
+ for (let i = 0; i < areas.length; i++)
566
+ {
567
+ if (!(areas[i] == null))
568
+ {
569
+ isAllRectanglesNotNull |= true;
570
+ stringAreas[i] = areas[i].toString();
571
+ }
572
+ }
573
+ if (!isAllRectanglesNotNull)
574
+ {
575
+ stringAreas = [];
576
+ }
577
+ }
578
+ if (stringAreas.length == 0)
579
+ {
580
+ this.getJavaClass().setBarCodeImageSync(image);
581
+ }
582
+ else
583
+ {
584
+ this.getJavaClass().setBarCodeImageSync(image, stringAreas);
585
+ }
586
+ }
587
+
588
+ /**
589
+ * Sets SingleDecodeType type array for recognition.
590
+ * Must be called before readBarCodes() method.
591
+ * @example
592
+ * //This sample shows how to detect Code39 and Code128 barcodes.
593
+ * let reader = new BarCodeReader();
594
+ * reader.setBarCodeReadType([ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
595
+ * reader.setBarCodeImage("test.png");
596
+ * reader.readBarCodes().forEach(function(result, i, results)
597
+ * {
598
+ * console.log("BarCode Type: " + result.getCodeTypeName());
599
+ * console.log("BarCode CodeText: " + result.getCodeText());
600
+ * });
601
+ * @param types The SingleDecodeType type array to read.
602
+ */
603
+ setBarCodeReadType(...types)
604
+ {
605
+ for (let i = 0; i < types.length; i++)
606
+ {
607
+ types[i] = types[i] + "";
608
+ }
609
+ this.getJavaClass().setBarCodeReadTypeSync(types);
610
+ }
611
+
612
+ getBarCodeDecodeType()
613
+ {
614
+ return this.getJavaClass().getBarCodeDecodeTypeSync();
615
+ }
616
+
617
+ /**
618
+ * Exports BarCode properties to the xml-file specified
619
+ * @param xmlFile The name of the file
620
+ * @return Whether or not export completed successfully.
621
+ * Returns True in case of success; False Otherwise
622
+ */
623
+ exportToXml(xmlFile)
624
+ {
625
+ try
626
+ {
627
+ let xmlData = this.getJavaClass().exportToXmlSync();
628
+ let isSaved = xmlData != null;
629
+ if(isSaved)
630
+ fs.writeFileSync(xmlFile, xmlData);
631
+ return isSaved;
632
+ }
633
+ catch (ex)
634
+ {
635
+ let barcode_exception = new joint.BarcodeException(ex);
636
+ throw barcode_exception;
637
+ }
638
+ }
639
+
640
+ /**
641
+ * Exports BarCode properties to the xml-file specified
642
+ * @param xmlFile The name of the file
643
+ * @return Whether or not export completed successfully. Returns True in case of success; False Otherwise
644
+ */
645
+ static importFromXml(xmlFile)
646
+ {
647
+ try
648
+ {
649
+ let xmlData = fs.readFileSync(xmlFile).toString();
650
+ let java_class_link = new java.import(BarCodeReader.javaClassName);
651
+ return BarCodeReader.construct(java_class_link.importFromXmlSync(xmlData.substring(3, xmlData.length)));
652
+ }
653
+ catch (ex)
654
+ {
655
+ let barcode_exception = new joint.BarcodeException(ex);
656
+ throw barcode_exception;
657
+ }
658
+ }
659
+ }
660
+
661
+ /**
662
+ * Stores a set of four Points that represent a Quadrangle region.
663
+ */
664
+ class Quadrangle extends joint.BaseJavaClass
665
+ {
666
+ static get javaClassName()
667
+ {
668
+ return "com.aspose.mw.barcode.recognition.MwQuadrangle";
669
+ }
670
+
671
+ leftTop;
672
+ rightTop;
673
+ rightBottom;
674
+ leftBottom;
675
+
676
+ /**
677
+ * Represents a Quadrangle structure with its properties left uninitialized.Value: Quadrangle
678
+ */
679
+ static get EMPTY()
680
+ {
681
+ return new Quadrangle(new joint.Point(0, 0), new joint.Point(0, 0), new joint.Point(0, 0), new joint.Point(0, 0));
682
+ }
683
+
684
+ static construct(...args)
685
+ {
686
+ let quadrangle = Quadrangle.EMPTY;
687
+ quadrangle.setJavaClass(args[0]);
688
+ return quadrangle;
689
+ }
690
+
691
+
692
+ /**
693
+ * Initializes a new instance of the Quadrangle structure with the describing points.
694
+ *
695
+ * @param leftTop A Point that represents the left-top corner of the Quadrangle.
696
+ * @param rightTop A Point that represents the right-top corner of the Quadrangle.
697
+ * @param rightBottom A Point that represents the right-bottom corner of the Quadrangle.
698
+ * @param leftBottom A Point that represents the left-bottom corner of the Quadrangle.
699
+ */
700
+ constructor(leftTop, rightTop, rightBottom, leftBottom)
701
+ {
702
+ let java_link = java.import(Quadrangle.javaClassName);
703
+ let javaClass = new java_link(leftTop.getJavaClass(), rightTop.getJavaClass(), rightBottom.getJavaClass(), leftBottom.getJavaClass());
704
+ super(javaClass);
705
+ this.init();
706
+ }
707
+
708
+ init()
709
+ {
710
+ this.leftTop = joint.Point.construct(this.getJavaClass().getLeftTopSync());
711
+ this.rightTop = joint.Point.construct(this.getJavaClass().getRightTopSync());
712
+ this.rightBottom = joint.Point.construct(this.getJavaClass().getRightBottomSync());
713
+ this.leftBottom = joint.Point.construct(this.getJavaClass().getLeftBottomSync());
714
+ }
715
+
716
+ /**
717
+ * Gets left-top corner Point of Quadrangle regionValue: A left-top corner Point of Quadrangle region
718
+ */
719
+ getLeftTop()
720
+ {
721
+ return this.leftTop;
722
+ }
723
+
724
+ /**
725
+ * Gets left-top corner Point of Quadrangle regionValue: A left-top corner Point of Quadrangle region
726
+ */
727
+ setLeftTop(value)
728
+ {
729
+ this.leftTop = value;
730
+ this.getJavaClass().setLeftTopSync(value.getJavaClass());
731
+ }
732
+
733
+ /**
734
+ * Gets right-top corner Point of Quadrangle regionValue: A right-top corner Point of Quadrangle region
735
+ */
736
+ getRightTop()
737
+ {
738
+ return this.rightTop;
739
+ }
740
+
741
+ /**
742
+ * Gets right-top corner Point of Quadrangle regionValue: A right-top corner Point of Quadrangle region
743
+ */
744
+ setRightTop(value)
745
+ {
746
+ this.rightTop = value;
747
+ this.getJavaClass().setRightTopSync(value.getJavaClass());
748
+ }
749
+
750
+ /**
751
+ * Gets right-bottom corner Point of Quadrangle regionValue: A right-bottom corner Point of Quadrangle region
752
+ */
753
+ getRightBottom()
754
+ {
755
+ return this.rightBottom;
756
+ }
757
+
758
+ /**
759
+ * Gets right-bottom corner Point of Quadrangle regionValue: A right-bottom corner Point of Quadrangle region
760
+ */
761
+ setRightBottom(value)
762
+ {
763
+ this.rightBottom = value;
764
+ this.getJavaClass().setRightBottomSync(value.getJavaClass());
765
+ }
766
+
767
+ /**
768
+ * Gets left-bottom corner Point of Quadrangle regionValue: A left-bottom corner Point of Quadrangle region
769
+ */
770
+ getLeftBottom()
771
+ {
772
+ return this.leftBottom;
773
+ }
774
+
775
+ /**
776
+ * Gets left-bottom corner Point of Quadrangle regionValue: A left-bottom corner Point of Quadrangle region
777
+ */
778
+ setLeftBottom(value)
779
+ {
780
+ this.leftBottom = value;
781
+ this.getJavaClass().setLeftBottomSync(value.getJavaClass());
782
+ }
783
+
784
+ /**
785
+ * Tests whether all Points of this Quadrangle have values of zero.Value: Returns true if all Points of this Quadrangle have values of zero; otherwise, false.
786
+ */
787
+ isEmpty()
788
+ {
789
+ return this.getJavaClass().isEmptySync();
790
+ }
791
+
792
+ /**
793
+ * Determines if the specified Point is contained within this Quadrangle structure.
794
+ *
795
+ * @param pt The Point to test.
796
+ * @return true if Point is contained within this Quadrangle structure; otherwise, false.
797
+ */
798
+ contains(pt)
799
+ {
800
+ return this.getJavaClass().containsSync(pt.getJavaClass());
801
+ }
802
+
803
+ /**
804
+ * Determines if the specified point is contained within this Quadrangle structure.
805
+ *
806
+ * @param x The x point cordinate.
807
+ * @param y The y point cordinate.
808
+ * @return Returns true if point is contained within this Quadrangle structure; otherwise, false.
809
+ */
810
+ containsPoint(x, y)
811
+ {
812
+ return this.getJavaClass().containsSync(x, y);
813
+ }
814
+
815
+ /**
816
+ * Determines if the specified Quadrangle is contained or intersect this Quadrangle structure.
817
+ *
818
+ * @param quad The Quadrangle to test.
819
+ * @return Returns true if Quadrangle is contained or intersect this Quadrangle structure; otherwise, false.
820
+ */
821
+ containsQuadrangle(quad)
822
+ {
823
+ return this.getJavaClass().containsSync(quad.getJavaClass());
824
+ }
825
+
826
+ /**
827
+ * Determines if the specified Rectangle is contained or intersect this Quadrangle structure.
828
+ *
829
+ * @param rect The Rectangle to test.
830
+ * @return Returns true if Rectangle is contained or intersect this Quadrangle structure; otherwise, false.
831
+ */
832
+ containsRectangle(rect)
833
+ {
834
+ return this.getJavaClass().containsSync(rect.getJavaClass());
835
+ }
836
+
837
+ /**
838
+ * Returns a value indicating whether this instance is equal to a specified Quadrangle value.
839
+ *
840
+ * @param other An Quadrangle value to compare to this instance.
841
+ * @return true if obj has the same value as this instance; otherwise, false.
842
+ */
843
+ equals(other)
844
+ {
845
+ return this.getJavaClass().equalsSync(other.getJavaClass());
846
+ }
847
+
848
+ /**
849
+ * Returns the hash code for this instance.
850
+ *
851
+ * @return A 32-bit signed integer hash code.
852
+ */
853
+ hashCode()
854
+ {
855
+ return this.getJavaClass().hashCodeSync();
856
+ }
857
+
858
+ /**
859
+ * Returns a human-readable string representation of this Quadrangle.
860
+ *
861
+ * @return A string that represents this Quadrangle.
862
+ */
863
+ toString()
864
+ {
865
+ return this.getJavaClass().toStringSync();
866
+ }
867
+
868
+ /**
869
+ * Creates Rectangle bounding this Quadrangle
870
+ *
871
+ * @return returns Rectangle bounding this Quadrangle
872
+ */
873
+ getBoundingRectangle()
874
+ {
875
+ return joint.Rectangle.construct(this.getJavaClass().getBoundingRectangleSync());
876
+ }
877
+ }
878
+
879
+ /**
880
+ * Stores a QR Structured Append information of recognized barcode
881
+ * @example
882
+ * //This sample shows how to get QR Structured Append data
883
+ *
884
+ * let reader = new BarCodeReader("test.png", null, DecodeType.QR);
885
+ * reader.readBarCodes().forEach(function(result, i, results)
886
+ * {
887
+ * console.log("BarCode Type: " + result.getCodeTypeName());
888
+ * console.log("BarCode CodeText: " + result.getCodeText());
889
+ * console.log("QR Structured Append Quantity: " + result.getExtended().getQR().getQRStructuredAppendModeBarCodesQuantity());
890
+ * console.log("QR Structured Append Index: " + result.getExtended().getQR().getQRStructuredAppendModeBarCodeIndex());
891
+ * console.log("QR Structured Append ParityData: " + result.getExtended().getQR().getQRStructuredAppendModeParityData());
892
+ * });
893
+ */
894
+ class QRExtendedParameters extends joint.BaseJavaClass
895
+ {
896
+ constructor(javaclass)
897
+ {
898
+ super(javaclass);
899
+ this.init()
900
+ }
901
+
902
+ init()
903
+ {
904
+ // TODO: Implement init() method.
905
+ }
906
+
907
+ /**
908
+ * Gets the QR structured append mode barcodes quantity. Default value is -1.Value: The quantity of the QR structured append mode barcode.
909
+ */
910
+ getQRStructuredAppendModeBarCodesQuantity()
911
+ {
912
+ return this.getJavaClass().getQRStructuredAppendModeBarCodesQuantitySync();
913
+ }
914
+
915
+ /**
916
+ * Gets the index of the QR structured append mode barcode. Index starts from 0. Default value is -1.Value: The quantity of the QR structured append mode barcode.
917
+ */
918
+ getQRStructuredAppendModeBarCodeIndex()
919
+ {
920
+ return this.getJavaClass().getQRStructuredAppendModeBarCodeIndexSync();
921
+ }
922
+
923
+ /**
924
+ * Gets the QR structured append mode parity data. Default value is -1.Value: The index of the QR structured append mode barcode.
925
+ */
926
+ getQRStructuredAppendModeParityData()
927
+ {
928
+ return this.getJavaClass().getQRStructuredAppendModeParityDataSync();
929
+ }
930
+
931
+ isEmpty()
932
+ {
933
+ return this.getJavaClass().isEmptySync();
934
+ }
935
+
936
+ /**
937
+ * Returns a value indicating whether this instance is equal to a specified QRExtendedParameters value.
938
+ *
939
+ * @param obj An object value to compare to this instance.
940
+ * @return true if obj has the same value as this instance; otherwise, false.
941
+ */
942
+ equals(obj)
943
+ {
944
+ return this.getJavaClass().equalsSync(obj.getJavaClass());
945
+ }
946
+
947
+ /**
948
+ * Returns the hash code for this instance.
949
+ *
950
+ * @return A 32-bit signed integer hash code.
951
+ */
952
+ hashCode()
953
+ {
954
+ return this.getJavaClass().hashCodeSync();
955
+ }
956
+
957
+ /**
958
+ * Returns a human-readable string representation of this QRExtendedParameters.
959
+ *
960
+ * @return A string that represents this QRExtendedParameters.
961
+ */
962
+ toString()
963
+ {
964
+ return this.getJavaClass().toStringSync();
965
+ }
966
+ }
967
+
968
+ /**
969
+ * Stores a MacroPdf417 metadata information of recognized barcode
970
+ * @example
971
+ * //This sample shows how to get Macro Pdf417 metadata
972
+ * let generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "12345");
973
+ * generator.getParameters().getBarcode().getPdf417().setPdf417MacroFileID(10);
974
+ * generator.getParameters().getBarcode().getPdf417().setPdf417MacroSegmentsCount(2);
975
+ * generator.getParameters().getBarcode().getPdf417().setPdf417MacroSegmentID(1);
976
+ * generator.save("test.png");
977
+ * let reader = new BarCodeReader("test.png", null, DecodeType.MACRO_PDF_417);
978
+ * reader.readBarCodes().forEach(function(result, i, results)
979
+ * {
980
+ * console.log("BarCode Type: " + result.getCodeTypeName());
981
+ * console.log("BarCode CodeText: " + result.getCodeText());
982
+ * console.log("Macro Pdf417 FileID: " + result.getExtended().getPdf417().getMacroPdf417FileID());
983
+ * console.log("Macro Pdf417 Segments: " + result.getExtended().getPdf417().getMacroPdf417SegmentsCount());
984
+ * console.log("Macro Pdf417 SegmentID: " + result.getExtended().getPdf417().getMacroPdf417SegmentID());
985
+ * });
986
+ */
987
+ class Pdf417ExtendedParameters extends joint.BaseJavaClass
988
+ {
989
+ constructor(javaclass)
990
+ {
991
+ super(javaclass);
992
+ this.init()
993
+ }
994
+
995
+ init()
996
+ {
997
+ // TODO: Implement init() method.
998
+ }
999
+
1000
+ /**
1001
+ * Gets the file ID of the barcode, only available with MacroPdf417.Value: The file ID for MacroPdf417
1002
+ */
1003
+ getMacroPdf417FileID()
1004
+ {
1005
+ return this.getJavaClass().getMacroPdf417FileIDSync();
1006
+ }
1007
+
1008
+ /**
1009
+ * Gets the segment ID of the barcode,only available with MacroPdf417.Value: The segment ID of the barcode.
1010
+ */
1011
+ getMacroPdf417SegmentID()
1012
+ {
1013
+ return this.getJavaClass().getMacroPdf417SegmentIDSync();
1014
+ }
1015
+
1016
+ /**
1017
+ * Gets macro pdf417 barcode segments count. Default value is -1.Value: Segments count.
1018
+ */
1019
+ getMacroPdf417SegmentsCount()
1020
+ {
1021
+ return this.getJavaClass().getMacroPdf417SegmentsCountSync();
1022
+ }
1023
+
1024
+ /**
1025
+ * Macro PDF417 file name (optional).
1026
+ * @return File name.
1027
+ */
1028
+ getMacroPdf417FileName()
1029
+ {
1030
+ return this.getJavaClass().getMacroPdf417FileNameSync();
1031
+ }
1032
+
1033
+ /**
1034
+ * Macro PDF417 file size (optional).
1035
+ * @return File size.
1036
+ */
1037
+ getMacroPdf417FileSize()
1038
+ {
1039
+ return this.getJavaClass().getMacroPdf417FileSizeSync();
1040
+ }
1041
+
1042
+ /**
1043
+ * Macro PDF417 sender name (optional).
1044
+ * @return Sender name
1045
+ */
1046
+ getMacroPdf417Sender()
1047
+ {
1048
+ return this.getJavaClass().getMacroPdf417SenderSync();
1049
+ }
1050
+
1051
+ /**
1052
+ * Macro PDF417 addressee name (optional).
1053
+ * @return Addressee name.
1054
+ */
1055
+ getMacroPdf417Addressee()
1056
+ {
1057
+ return this.getJavaClass().getMacroPdf417AddresseeSync();
1058
+ }
1059
+
1060
+ /**
1061
+ * Macro PDF417 time stamp (optional).
1062
+ * @return Time stamp.
1063
+ */
1064
+ getMacroPdf417TimeStamp()
1065
+ {
1066
+ return new Date(this.getJavaClass().getMacroPdf417TimeStampSync() * 1000);
1067
+ }
1068
+
1069
+ /**
1070
+ * Macro PDF417 checksum (optional).
1071
+ * @return Checksum.
1072
+ */
1073
+ getMacroPdf417Checksum()
1074
+ {
1075
+ return this.getJavaClass().getMacroPdf417ChecksumSync();
1076
+ }
1077
+
1078
+ /**
1079
+ * Tests whether all parameters has only default values
1080
+ * Value: Returns {@code <b>true</b>} if all parameters has only default values; otherwise, {@code <b>false</b>}.
1081
+ */
1082
+ isEmpty()
1083
+ {
1084
+ return this.getJavaClass().isEmptySync();
1085
+ }
1086
+
1087
+ /**
1088
+ * Returns a value indicating whether this instance is equal to a specified Pdf417ExtendedParameters value.
1089
+ *
1090
+ * @param obj An System.Object value to compare to this instance.
1091
+ * @return true if obj has the same value as this instance; otherwise, false.
1092
+ */
1093
+ equals(obj)
1094
+ {
1095
+ return this.getJavaClass().equalsSync(obj.getJavaClass());
1096
+ }
1097
+
1098
+ /**
1099
+ * Returns the hash code for this instance.
1100
+ *
1101
+ * @return A 32-bit signed integer hash code.
1102
+ */
1103
+ hashCode()
1104
+ {
1105
+ return this.getJavaClass().hashCodeSync();
1106
+ }
1107
+
1108
+ /**
1109
+ * Returns a human-readable string representation of this Pdf417ExtendedParameters.
1110
+ *
1111
+ * @return A string that represents this Pdf417ExtendedParameters.
1112
+ */
1113
+ toString()
1114
+ {
1115
+ return this.getJavaClass().toStringSync();
1116
+ }
1117
+ }
1118
+
1119
+ /**
1120
+ * Stores special data of 1D recognized barcode like separate codetext and checksum
1121
+ * @example
1122
+ * //This sample shows how to get 1D barcode value and checksum
1123
+ * let generator = new BarcodeGenerator(EncodeTypes.EAN_13, "1234567890128");
1124
+ * generator.save("test.png");
1125
+ * let reader = new BarCodeReader("test.png", null, DecodeType.EAN_13);
1126
+ * reader.readBarCodes().forEach(function(result, i, results)
1127
+ * {
1128
+ * console.log("BarCode Type: " + result.getCodeTypeName());
1129
+ * console.log("BarCode CodeText: " + result.getCodeText());
1130
+ * console.log("BarCode Value: " + result.getExtended().getOneD().getValue());
1131
+ * console.log("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
1132
+ * });
1133
+ */
1134
+ class OneDExtendedParameters extends joint.BaseJavaClass
1135
+ {
1136
+ constructor(javaclass)
1137
+ {
1138
+ super(javaclass);
1139
+ this.init()
1140
+ }
1141
+
1142
+ init()
1143
+ {
1144
+ // TODO: Implement init() method.
1145
+ }
1146
+
1147
+ /**
1148
+ * Gets the codetext of 1D barcodes without checksum. Value: The codetext of 1D barcodes without checksum.
1149
+ */
1150
+ getValue()
1151
+ {
1152
+ return this.getJavaClass().getValueSync();
1153
+ }
1154
+
1155
+ /**
1156
+ * Gets the checksum for 1D barcodes. Value: The checksum for 1D barcode.
1157
+ */
1158
+ getCheckSum()
1159
+ {
1160
+ return this.getJavaClass().getCheckSumSync();
1161
+ }
1162
+
1163
+ /**
1164
+ * Tests whether all parameters has only default values
1165
+ * Value: Returns {@code <b>true</b>} if all parameters has only default values; otherwise, {@code <b>false</b>}.
1166
+ */
1167
+ isEmpty()
1168
+ {
1169
+ return this.getJavaClass().isEmptySync();
1170
+ }
1171
+
1172
+ /**
1173
+ * Returns a value indicating whether this instance is equal to a specified OneDExtendedParameters value.
1174
+ *
1175
+ * @param obj An System.Object value to compare to this instance.
1176
+ * @return true if obj has the same value as this instance; otherwise, false.
1177
+ */
1178
+ equals(obj)
1179
+ {
1180
+ return this.getJavaClass().equalsSync(obj.getJavaClass());
1181
+ }
1182
+
1183
+ /**
1184
+ * Returns the hash code for this instance.
1185
+ *
1186
+ * @return A 32-bit signed integer hash code.
1187
+ */
1188
+ hashCode()
1189
+ {
1190
+ return this.getJavaClass().hashCodeSync();
1191
+ }
1192
+
1193
+ /**
1194
+ * Returns a human-readable string representation of this OneDExtendedParameters.
1195
+ *
1196
+ * @return A string that represents this OneDExtendedParameters.
1197
+ */
1198
+ toString()
1199
+ {
1200
+ return this.getJavaClass().toStringSync();
1201
+ }
1202
+ }
1203
+
1204
+ /**
1205
+ * Stores special data of Code128 recognized barcode
1206
+ * Represents the recognized barcode's region and barcode angle
1207
+ * @example
1208
+ * //This sample shows how to get code128 raw values
1209
+ * let generator = new BarcodeGenerator(EncodeTypes.Code128, "12345");
1210
+ * generator.save("test.png");
1211
+ * let reader = new BarCodeReader("test.png", null, DecodeType.CODE_128);
1212
+ * reader.readBarCodes().forEach(function(result, i, results)
1213
+ * {
1214
+ * console.log("BarCode Type: " + result.getCodeTypeName());
1215
+ * console.log("BarCode CodeText: " + result.getCodeText());
1216
+ * console.log("Code128 Data Portions: " + result.getExtended().getCode128());
1217
+ * });
1218
+ */
1219
+ class Code128ExtendedParameters extends joint.BaseJavaClass
1220
+ {
1221
+ code128DataPortions;
1222
+
1223
+ constructor(javaclass)
1224
+ {
1225
+ super(javaclass);
1226
+ this.init()
1227
+ }
1228
+
1229
+ init()
1230
+ {
1231
+ this.code128DataPortions = Code128ExtendedParameters.convertCode128DataPortions(this.getJavaClass().getCode128DataPortionsSync());
1232
+ }
1233
+
1234
+ static convertCode128DataPortions(javaCode128DataPortions)
1235
+ {
1236
+ let code128DataPortionsValues = javaCode128DataPortions;
1237
+ let code128DataPortions = [];
1238
+ for (let i = 0; i < code128DataPortionsValues.length; i++)
1239
+ {
1240
+ code128DataPortions[i] = Code128DataPortion.construct(code128DataPortionsValues[i]);
1241
+ }
1242
+ return code128DataPortions;
1243
+ }
1244
+
1245
+ /**
1246
+ * Gets Code128DataPortion array of recognized Code128 barcode Value of the Code128DataPortion.
1247
+ */
1248
+ getCode128DataPortions()
1249
+ {
1250
+ return this.code128DataPortions;
1251
+ }
1252
+
1253
+ isEmpty()
1254
+ {
1255
+ return this.getJavaClass().isEmptySync();
1256
+ }
1257
+
1258
+ /**
1259
+ * Returns a value indicating whether this instance is equal to a specified Code128ExtendedParameters value.
1260
+ *
1261
+ * @param obj An System.Object value to compare to this instance.
1262
+ * @return true if obj has the same value as this instance; otherwise, false.
1263
+ */
1264
+ equals(obj)
1265
+ {
1266
+ return this.getJavaClass().equalsSync(obj.getJavaClass());
1267
+ }
1268
+
1269
+ /**
1270
+ * Returns the hash code for this instance.
1271
+ *
1272
+ * @return A 32-bit signed integer hash code.
1273
+ */
1274
+ hashCode()
1275
+ {
1276
+ return this.getJavaClass().hashCodeSync();
1277
+ }
1278
+
1279
+ /**
1280
+ * Returns a human-readable string representation of this Code128ExtendedParameters.
1281
+ *
1282
+ * @return A string that represents this Code128ExtendedParameters.
1283
+ */
1284
+ toString()
1285
+ {
1286
+ return this.getJavaClass().toStringSync();
1287
+ }
1288
+ }
1289
+
1290
+ /**
1291
+ * Barcode detector settings.
1292
+ */
1293
+ class BarcodeSvmDetectorSettings extends joint.BaseJavaClass
1294
+ {
1295
+ static get javaClassName()
1296
+ {
1297
+ return "com.aspose.mw.barcode.recognition.MwBarcodeSvmDetectorSettings";
1298
+ }
1299
+
1300
+ /**
1301
+ * High performance detection preset.
1302
+ *
1303
+ * Default for {@code QualitySettings.PresetType.HighPerformance}
1304
+ */
1305
+ static get HighPerformance()
1306
+ {
1307
+ return 0;
1308
+ }
1309
+
1310
+ /**
1311
+ * Normal quality detection preset.
1312
+ *
1313
+ * Default for {@code QualitySettings.PresetType.NormalQuality}
1314
+ */
1315
+ static get NormalQuality()
1316
+ {
1317
+ return 1;
1318
+ }
1319
+
1320
+ /**
1321
+ * High quality detection preset.
1322
+ *
1323
+ * Default for {@code QualitySettings.PresetType.HighQualityDetection} and {@code QualitySettings.PresetType.HighQuality}
1324
+ */
1325
+ static get HighQuality()
1326
+ {
1327
+ return 2;
1328
+ }
1329
+
1330
+ /**
1331
+ * Max quality detection preset.
1332
+ *
1333
+ * Default for {@code QualitySettings.PresetType.MaxQualityDetection} and {@code QualitySettings.PresetType.MaxBarCodes}
1334
+ */
1335
+ static get MaxQuality()
1336
+ {
1337
+ return 3;
1338
+ }
1339
+
1340
+ scanWindowSizes;
1341
+
1342
+ constructor(javaclass)
1343
+ {
1344
+ super(javaclass);
1345
+ this.init()
1346
+ }
1347
+
1348
+ init()
1349
+ {
1350
+ this.scanWindowSizes = BarcodeSvmDetectorSettings.convertScanWindowSizes(this.getJavaClass().getScanWindowSizesSync());
1351
+ // TODO: Implement init() method.
1352
+ }
1353
+
1354
+ static convertScanWindowSizes(javaScanWindowSizes)
1355
+ {
1356
+ let scanWindowSizes = [];
1357
+ for (let i = 0; i < javaScanWindowSizes.size(); i++)
1358
+ {
1359
+ scanWindowSizes[i] = javaScanWindowSizes.get(i);
1360
+ }
1361
+ return scanWindowSizes;
1362
+ }
1363
+
1364
+ /**
1365
+ * Scan window sizes in pixels.<br>
1366
+ *
1367
+ * Allowed sizes are 10, 15, 20, 25, 30.<br>
1368
+ * Scanning with small window size takes more time and provides more accuracy but may fail in detecting very big barcodes.<br>
1369
+ * Combining of several window sizes can improve detection quality.
1370
+ */
1371
+ getScanWindowSizes()
1372
+ {
1373
+ return this.scanWindowSizes;
1374
+ }
1375
+
1376
+ /**
1377
+ * Scan window sizes in pixels.<br>
1378
+ *
1379
+ * Allowed sizes are 10, 15, 20, 25, 30.<br>
1380
+ * Scanning with small window size takes more time and provides more accuracy but may fail in detecting very big barcodes.<br>
1381
+ * Combining of several window sizes can improve detection quality.
1382
+ */
1383
+ setScanWindowSizes(value)
1384
+ {
1385
+ this.scanWindowSizes = value;
1386
+ var ArrayList = java.import('java.util.ArrayList');
1387
+ var valueList = new ArrayList();
1388
+ value.forEach(function(item, i, value)
1389
+ {
1390
+ valueList.addSync(item);
1391
+ });
1392
+ this.getJavaClass().setScanWindowSizesSync(valueList);
1393
+ }
1394
+
1395
+ /**
1396
+ * Similarity coefficient depends on how homogeneous barcodes are.<br>
1397
+ *
1398
+ * Use high value for for clear barcodes.<br>
1399
+ * Use low values to detect barcodes that ara partly damaged or not lighten evenly.<br>
1400
+ * Similarity coefficient must be between [0.5, 0.9]
1401
+ */
1402
+ getSimilarityCoef()
1403
+ {
1404
+ return this.getJavaClass().getSimilarityCoefSync();
1405
+ }
1406
+
1407
+ /**
1408
+ * Similarity coefficient depends on how homogeneous barcodes are.<br>
1409
+ *
1410
+ * Use high value for for clear barcodes.<br>
1411
+ * Use low values to detect barcodes that ara partly damaged or not lighten evenly.<br>
1412
+ * Similarity coefficient must be between [0.5, 0.9]
1413
+ */
1414
+ setSimilarityCoef(value)
1415
+ {
1416
+ this.getJavaClass().setSimilarityCoefSync(value);
1417
+ }
1418
+
1419
+ /**
1420
+ * Sets threshold for detected regions that may contain barcodes.<br>
1421
+ *
1422
+ * Value 0.7 means that bottom 70% of possible regions are filtered out and not processed further.<br>
1423
+ * Region likelihood threshold must be between [0.05, 0.9]<br>
1424
+ * Use high values for clear images with few barcodes.<br>
1425
+ * Use low values for images with many barcodes or for noisy images.<br>
1426
+ * Low value may lead to a bigger recognition time.<br>
1427
+ */
1428
+ getRegionLikelihoodThresholdPercent()
1429
+ {
1430
+ return this.getJavaClass().getRegionLikelihoodThresholdPercentSync();
1431
+ }
1432
+
1433
+ /**
1434
+ * Sets threshold for detected regions that may contain barcodes.<br>
1435
+ *
1436
+ * Value 0.7 means that bottom 70% of possible regions are filtered out and not processed further.<br>
1437
+ * Region likelihood threshold must be between [0.05, 0.9]<br>
1438
+ * Use high values for clear images with few barcodes.<br>
1439
+ * Use low values for images with many barcodes or for noisy images.<br>
1440
+ * Low value may lead to a bigger recognition time.
1441
+ */
1442
+ setRegionLikelihoodThresholdPercent(value)
1443
+ {
1444
+ this.getJavaClass().setRegionLikelihoodThresholdPercentSync(value);
1445
+ }
1446
+
1447
+ /**
1448
+ * Allows detector to skip search for diagonal barcodes.<br>
1449
+ *
1450
+ * Setting it to false will increase detection time but allow to find diagonal barcodes that can be missed otherwise.<br>
1451
+ * Enabling of diagonal search leads to a bigger detection time.
1452
+ */
1453
+ getSkipDiagonalSearch()
1454
+ {
1455
+ return this.getJavaClass().getSkipDiagonalSearchSync();
1456
+ }
1457
+
1458
+ /**
1459
+ * Allows detector to skip search for diagonal barcodes.<br>
1460
+ *
1461
+ * Setting it to false will increase detection time but allow to find diagonal barcodes that can be missed otherwise.<br>
1462
+ * Enabling of diagonal search leads to a bigger detection time.
1463
+ */
1464
+ setSkipDiagonalSearch(value)
1465
+ {
1466
+ this.getJavaClass().setSkipDiagonalSearchSync(value);
1467
+ }
1468
+
1469
+ /**
1470
+ * Window size for median smoothing.<br>
1471
+ *
1472
+ * Typical values are 3 or 4. 0 means no median smoothing.<br>
1473
+ * Default value is 0.<br>
1474
+ * Median filter window size must be between [0, 10]
1475
+ */
1476
+ getMedianFilterWindowSize()
1477
+ {
1478
+ return this.getJavaClass().getMedianFilterWindowSizeSync();
1479
+ }
1480
+
1481
+ /**
1482
+ * Window size for median smoothing.<br>
1483
+ *
1484
+ * Typical values are 3 or 4. 0 means no median smoothing.<br>
1485
+ * Default value is 0.<br>
1486
+ * Median filter window size must be between [0, 10]
1487
+ */
1488
+ setMedianFilterWindowSize(value)
1489
+ {
1490
+ this.getJavaClass().setMedianFilterWindowSizeSync(value);
1491
+ }
1492
+
1493
+ /**
1494
+ * High performance detection preset.<br>
1495
+ *
1496
+ * Default for QualitySettings.PresetType.HighPerformance
1497
+ */
1498
+ static getHighPerformance()
1499
+ {
1500
+ return new BarcodeSvmDetectorSettings(QualitySettings.HighPerformance);
1501
+ }
1502
+
1503
+ /**
1504
+ * Normal quality detection preset.<br>
1505
+ *
1506
+ * Default for QualitySettings.PresetType.NormalQuality
1507
+ */
1508
+ static getNormalQuality()
1509
+ {
1510
+ return new BarcodeSvmDetectorSettings(QualitySettings.NormalQuality);
1511
+ }
1512
+
1513
+ /**
1514
+ * High quality detection preset.<br>
1515
+ *
1516
+ * Default for QualitySettings.PresetType.HighQualityDetection and QualitySettings.PresetType.HighQuality
1517
+ */
1518
+ static getHighQuality()
1519
+ {
1520
+ return new BarcodeSvmDetectorSettings(QualitySettings.HighQuality);
1521
+ }
1522
+
1523
+ /**
1524
+ * Max quality detection preset.<br>
1525
+ *
1526
+ * Default for QualitySettings.PresetType.MaxQualityDetection and QualitySettings.PresetType.MaxBarCodes
1527
+ */
1528
+ static getMaxQuality()
1529
+ {
1530
+ return new BarcodeSvmDetectorSettings(QualitySettings.MaxQuality);
1531
+ }
1532
+ }
1533
+
1534
+ /**
1535
+ * Stores recognized barcode data like SingleDecodeType type, {@code string} codetext,<br>
1536
+ * BarCodeRegionParameters region and other parameters
1537
+ * @example
1538
+ * //This sample shows how to obtain BarCodeResult.
1539
+ * let generator = new BarcodeGenerator(EncodeTypes.Code128, "12345");
1540
+ * generator.save("test.png");
1541
+ * let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
1542
+ * reader.readBarCodes().forEach(function(result, i, results)
1543
+ * {
1544
+ * console.log("BarCode Type: " + result.getCodeTypeName());
1545
+ * console.log("BarCode CodeText: " + result.getCodeText());
1546
+ * console.log("BarCode Confidence: " + result.getConfidence());
1547
+ * console.log("BarCode ReadingQuality: " + result.getReadingQuality());
1548
+ * console.log("BarCode Angle: " + result.getRegion().getAngle());
1549
+ * });
1550
+ */
1551
+ class BarCodeResult extends joint.BaseJavaClass
1552
+ {
1553
+ region;
1554
+ extended;
1555
+
1556
+ constructor(javaclass)
1557
+ {
1558
+ super(javaclass);
1559
+ this.init()
1560
+ }
1561
+
1562
+ init()
1563
+ {
1564
+ this.region = new BarCodeRegionParameters(this.getJavaClass().getRegionSync());
1565
+ this.extended = new BarCodeExtendedParameters(this.getJavaClass().getExtendedSync());
1566
+ }
1567
+
1568
+ /**
1569
+ * Gets the reading quality. Works for 1D and postal barcodes. Value: The reading quality percent
1570
+ */
1571
+ getReadingQuality()
1572
+ {
1573
+ return this.getJavaClass().getReadingQualitySync();
1574
+ }
1575
+
1576
+ /**
1577
+ * Gets recognition confidence level of the recognized barcode Value: <br>
1578
+ * BarCodeConfidence.Strong does not have fakes or misrecognitions, BarCodeConfidence.Moderate<br>
1579
+ * could sometimes have fakes or incorrect codetext because this confidence level for barcodews with weak cheksum or even without it,<br>
1580
+ * BarCodeConfidence.NONE always has incorrect codetext and could be fake recognitions
1581
+ */
1582
+ getConfidence()
1583
+ {
1584
+ return this.getJavaClass().getConfidenceSync();
1585
+ }
1586
+
1587
+ /**
1588
+ * Gets the code text Value: The code text of the barcode
1589
+ */
1590
+ getCodeText()
1591
+ {
1592
+ return this.getJavaClass().getCodeTextSync();
1593
+ }
1594
+
1595
+ /**
1596
+ * Gets the encoded code bytes Value: The code bytes of the barcode
1597
+ */
1598
+ getCodeBytes()
1599
+ {
1600
+ let str = this.getJavaClass().getCodeBytesSync();
1601
+ return str.split(",");
1602
+ }
1603
+
1604
+ /**
1605
+ * Gets the barcode type Value: The type information of the recognized barcode
1606
+ */
1607
+ getCodeType()
1608
+ {
1609
+ return this.getJavaClass().getCodeTypeSync();
1610
+ }
1611
+
1612
+ /**
1613
+ * Gets the name of the barcode type Value: The type name of the recognized barcode
1614
+ */
1615
+ getCodeTypeName()
1616
+ {
1617
+ return this.getJavaClass().getCodeTypeNameSync();
1618
+ }
1619
+
1620
+ /**
1621
+ * Gets the barcode region Value: The region of the recognized barcode
1622
+ */
1623
+ getRegion()
1624
+ {
1625
+ return this.region;
1626
+ }
1627
+
1628
+ /**
1629
+ * Gets extended parameters of recognized barcode Value: The extended parameters of recognized barcode
1630
+ */
1631
+ getExtended()
1632
+ {
1633
+ return this.extended;
1634
+ }
1635
+
1636
+ /**
1637
+ * Returns a value indicating whether this instance is equal to a specified BarCodeResult value.
1638
+ *
1639
+ * @param other An BarCodeResult value to compare to this instance.
1640
+ * @return true if obj has the same value as this instance; otherwise, false.
1641
+ */
1642
+ equals(other)
1643
+ {
1644
+ return this.getJavaClass().equalsSync(other.getJavaClass());
1645
+ }
1646
+
1647
+ /**
1648
+ * Returns the hash code for this instance.
1649
+ *
1650
+ * @return A 32-bit signed integer hash code.
1651
+ */
1652
+ hashCode()
1653
+ {
1654
+ return this.getJavaClass().hashCodeSync();
1655
+ }
1656
+
1657
+ /**
1658
+ * Returns a human-readable string representation of this BarCodeResult.
1659
+ *
1660
+ * @return A string that represents this BarCodeResult.
1661
+ */
1662
+ toString()
1663
+ {
1664
+ return this.getJavaClass().toStringSync();
1665
+ }
1666
+
1667
+ /**
1668
+ * Creates a copy of BarCodeResult class.
1669
+ *
1670
+ * @return Returns copy of BarCodeResult class.
1671
+ */
1672
+ deepClone()
1673
+ {
1674
+ return new BarCodeResult(this);
1675
+ }
1676
+ }
1677
+
1678
+ /**
1679
+ * Represents the recognized barcode's region and barcode angle
1680
+ * @example
1681
+ * //This sample shows how to get barcode Angle and bounding quadrangle values
1682
+ * let generator = new BarcodeGenerator(EncodeTypes.Code128, "12345");
1683
+ * generator.save("test.png");
1684
+ * let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
1685
+ * reader.readBarCodes().forEach(function(result, i, results)
1686
+ * {
1687
+ * console.log("BarCode CodeText: " + result.getCodeText());
1688
+ * console.log("BarCode Angle: " + result.getRegion().getAngle());
1689
+ * console.log("BarCode Quadrangle: " + result.getRegion().getQuadrangle());
1690
+ * });
1691
+ */
1692
+ class BarCodeRegionParameters extends joint.BaseJavaClass
1693
+ {
1694
+ quad;
1695
+ rect;
1696
+ points;
1697
+
1698
+ constructor(javaclass)
1699
+ {
1700
+ super(javaclass);
1701
+ this.init()
1702
+ }
1703
+
1704
+ init()
1705
+ {
1706
+ this.quad = Quadrangle.construct(this.getJavaClass().getQuadrangleSync());
1707
+ this.rect = joint.Rectangle.construct(this.getJavaClass().getRectangleSync());
1708
+ this.points = BarCodeRegionParameters.convertJavaPoints(this.getJavaClass().getPointsSync());
1709
+ // TODO: Implement init() method.
1710
+ }
1711
+
1712
+ static convertJavaPoints(javaPoints)
1713
+ {
1714
+ let points = [];
1715
+ for (let i = 0; i < javaPoints.length; i++)
1716
+ {
1717
+ points[i] = new joint.Point(javaPoints[i].getXSync(), javaPoints[i].getYSync());
1718
+ }
1719
+
1720
+ return points;
1721
+ }
1722
+
1723
+ /**
1724
+ * Gets Quadrangle bounding barcode region Value: Returns Quadrangle bounding barcode region
1725
+ */
1726
+ getQuadrangle()
1727
+ {
1728
+ return this.quad;
1729
+ }
1730
+
1731
+ /**
1732
+ * Gets the angle of the barcode (0-360). Value: The angle for barcode (0-360).
1733
+ */
1734
+ getAngle()
1735
+ {
1736
+ return this.getJavaClass().getAngleSync();
1737
+ }
1738
+
1739
+ /**
1740
+ * Gets Points array bounding barcode region Value: Returns Points array bounding barcode region
1741
+ */
1742
+ getPoints()
1743
+ {
1744
+ return this.points;
1745
+ }
1746
+
1747
+ /**
1748
+ * Gets Rectangle bounding barcode region Value: Returns Rectangle bounding barcode region
1749
+ */
1750
+ getRectangle()
1751
+ {
1752
+ return this.rect;
1753
+ }
1754
+
1755
+ /**
1756
+ * Returns a value indicating whether this instance is equal to a specified BarCodeRegionParameters value.<br>
1757
+ *
1758
+ * @param obj An System.Object value to compare to this instance.<br>
1759
+ * @return true if obj has the same value as this instance; otherwise, false.
1760
+ */
1761
+ equals(obj)
1762
+ {
1763
+ return this.getJavaClass().equalsSync(obj.getJavaClass());
1764
+ }
1765
+
1766
+ /**
1767
+ * Returns the hash code for this instance.<br>
1768
+ *
1769
+ * @return A 32-bit signed integer hash code.
1770
+ */
1771
+ hashCode()
1772
+ {
1773
+ return this.getJavaClass().hashCodeSync();
1774
+ }
1775
+
1776
+ /**
1777
+ * Returns a human-readable string representation of this BarCodeRegionParameters.<br>
1778
+ *
1779
+ * @return A string that represents this BarCodeRegionParameters.
1780
+ */
1781
+ toString()
1782
+ {
1783
+ return this.getJavaClass().toStringSync();
1784
+ }
1785
+ }
1786
+
1787
+ class BarCodeExtendedParameters extends joint.BaseJavaClass
1788
+ {
1789
+ _oneDParameters;
1790
+ _code128Parameters;
1791
+ _qrParameters;
1792
+ _pdf417Parameters;
1793
+ _dataBarParameters;
1794
+
1795
+ constructor(javaclass)
1796
+ {
1797
+ super(javaclass);
1798
+ this.init()
1799
+ }
1800
+
1801
+ init()
1802
+ {
1803
+ this._oneDParameters = new OneDExtendedParameters(this.getJavaClass().getOneDSync());
1804
+ this._code128Parameters = new Code128ExtendedParameters(this.getJavaClass().getCode128Sync());
1805
+ this._qrParameters = new QRExtendedParameters(this.getJavaClass().getQRSync());
1806
+ this._pdf417Parameters = new Pdf417ExtendedParameters(this.getJavaClass().getPdf417Sync());
1807
+ this._dataBarParameters = new DataBarExtendedParameters(this.getJavaClass().getDataBarSync());
1808
+ }
1809
+
1810
+ /** Gets a DataBar additional information DataBarExtendedParameters of recognized barcode<br>
1811
+ * @return mixed A DataBar additional information DataBarExtendedParameters of recognized barcode
1812
+ */
1813
+ getDataBar()
1814
+ {
1815
+ return this._dataBarParameters;
1816
+ }
1817
+
1818
+ /**
1819
+ * Gets a special data OneDExtendedParameters of 1D recognized barcode Value: A special data OneDExtendedParameters of 1D recognized barcode
1820
+ */
1821
+ getOneD()
1822
+ {
1823
+ return this._oneDParameters;
1824
+ }
1825
+
1826
+ /**
1827
+ * Gets a special data Code128ExtendedParameters of Code128 recognized barcode Value: A special data Code128ExtendedParameters of Code128 recognized barcode
1828
+ */
1829
+ getCode128()
1830
+ {
1831
+ return this._code128Parameters;
1832
+ }
1833
+
1834
+ /**
1835
+ * Gets a QR Structured Append information QRExtendedParameters of recognized barcode Value: A QR Structured Append information QRExtendedParameters of recognized barcode
1836
+ */
1837
+ getQR()
1838
+ {
1839
+ return this._qrParameters;
1840
+ }
1841
+
1842
+ /**
1843
+ * Gets a MacroPdf417 metadata information Pdf417ExtendedParameters of recognized barcode Value: A MacroPdf417 metadata information Pdf417ExtendedParameters of recognized barcode
1844
+ */
1845
+ getPdf417()
1846
+ {
1847
+ return this._pdf417Parameters;
1848
+ }
1849
+
1850
+ /**
1851
+ * Returns a value indicating whether this instance is equal to a specified BarCodeExtendedParameters value.<br>
1852
+ *
1853
+ * @param obj An System.Object value to compare to this instance.
1854
+ * @return true if obj has the same value as this instance; otherwise, false.
1855
+ */
1856
+ equals(obj)
1857
+ {
1858
+ return this.getJavaClass().equalsSync(obj.getJavaClass());
1859
+ }
1860
+
1861
+ /**
1862
+ * Returns the hash code for this instance.
1863
+ *
1864
+ * @return A 32-bit signed integer hash code.
1865
+ */
1866
+ hashCode()
1867
+ {
1868
+ return this.getJavaClass().hashCodeSync();
1869
+ }
1870
+
1871
+ /**
1872
+ * Returns a human-readable string representation of this BarCodeExtendedParameters.
1873
+ *
1874
+ * @return A string that represents this BarCodeExtendedParameters.
1875
+ */
1876
+ toString()
1877
+ {
1878
+ return this.getJavaClass().toStringSync();
1879
+ }
1880
+ }
1881
+
1882
+ /**
1883
+ * QualitySettings allows to configure recognition quality and speed manually.
1884
+ * You can quickly set up QualitySettings by embedded presets: HighPerformance, NormalQuality,
1885
+ * HighQuality, MaxBarCodes or you can manually configure separate options.
1886
+ * Default value of QualitySettings is NormalQuality.
1887
+ * @example
1888
+ * //This sample shows how to use QualitySettings with BarCodeReader
1889
+ * let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
1890
+ * //set high performance mode
1891
+ * reader.setQualitySettings(QualitySettings.getHighPerformance());
1892
+ * reader.readBarCodes().forEach(function(result, i, results)
1893
+ * {
1894
+ * console.log("BarCode CodeText: " + result.getCodeText());
1895
+ * });
1896
+ * let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
1897
+ * //normal quality mode is set by default
1898
+ * reader.readBarCodes().forEach(function(result, i, results)
1899
+ * {
1900
+ * console.log("BarCode CodeText: " + result.getCodeText());
1901
+ * });
1902
+ * let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
1903
+ * //set high quality mode with low speed recognition
1904
+ * reader.setQualitySettings(QualitySettings.getHighQuality());
1905
+ * reader.readBarCodes().forEach(function(result, i, results)
1906
+ * {
1907
+ * console.log("BarCode CodeText: " + result.getCodeText());
1908
+ * });
1909
+ * let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
1910
+ * //set max barcodes mode, which tries to find all possible barcodes, even incorrect. The slowest recognition mode
1911
+ * reader.setQualitySettings(QualitySettings.getMaxBarCodes());
1912
+ * reader.readBarCodes().forEach(function(result, i, results)
1913
+ * {
1914
+ * console.log("BarCode CodeText: " + result.getCodeText());
1915
+ * });
1916
+ * let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
1917
+ * //set high performance mode
1918
+ * reader.setQualitySettings(QualitySettings.getHighPerformance());
1919
+ * //set separate options
1920
+ * reader.getQualitySettings().setAllowMedianSmoothing(true);
1921
+ * reader.getQualitySettings().setMedianSmoothingWindowSize(5);
1922
+ * reader.readBarCodes().forEach(function(result, i, results)
1923
+ * {
1924
+ * console.log("BarCode CodeText: " + result.getCodeText());
1925
+ * });
1926
+ * let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
1927
+ * //default mode is NormalQuality
1928
+ * //set separate options
1929
+ * reader.getQualitySettings().setAllowMedianSmoothing(true);
1930
+ * reader.getQualitySettings().setMedianSmoothingWindowSize(5);
1931
+ * reader.readBarCodes().forEach(function(result, i, results)
1932
+ * {
1933
+ * console.log("BarCode CodeText: " + result.getCodeText());
1934
+ * });
1935
+ */
1936
+ class QualitySettings extends joint.BaseJavaClass
1937
+ {
1938
+
1939
+ static get javaClassName()
1940
+ {
1941
+ return "com.aspose.mw.barcode.recognition.MwQualitySettings";
1942
+ }
1943
+
1944
+ detectorSettings;
1945
+
1946
+ constructor(qualitySettings)
1947
+ {
1948
+ super(QualitySettings.initQualitySettings(qualitySettings));
1949
+ if (qualitySettings instanceof QualitySettings)
1950
+ {
1951
+ this.applyAll(qualitySettings);
1952
+ }
1953
+ this.init();
1954
+ }
1955
+
1956
+ static initQualitySettings(qualitySettings)
1957
+ {
1958
+ let javaClassName = "com.aspose.mw.barcode.recognition.MwQualitySettings";
1959
+ if (qualitySettings instanceof QualitySettings || (qualitySettings === null))
1960
+ {
1961
+ let QualitySettings = java.import(javaClassName);
1962
+ return new QualitySettings();
1963
+ }
1964
+ else
1965
+ {
1966
+ return qualitySettings;
1967
+ }
1968
+ }
1969
+
1970
+ init()
1971
+ {
1972
+ this.detectorSettings = new BarcodeSvmDetectorSettings(this.getJavaClass().getDetectorSettingsSync());
1973
+ }
1974
+
1975
+ /**
1976
+ * HighPerformance recognition quality preset. High quality barcodes are recognized well in this mode.<br>
1977
+ * @example
1978
+ * let reader = new BarCodeReader("test.png");
1979
+ * reader.setQualitySettings(QualitySettings.getHighPerformance());
1980
+ *
1981
+ * Value:
1982
+ * HighPerformance recognition quality preset.
1983
+ */
1984
+ static getHighPerformance()
1985
+ {
1986
+ let JavaQualitySettings = java.import(QualitySettings.javaClassName);
1987
+ return new QualitySettings(JavaQualitySettings.getHighPerformanceSync());
1988
+ }
1989
+
1990
+ /**
1991
+ * NormalQuality recognition quality preset. Suitable for the most of barcodes
1992
+ *
1993
+ * @example
1994
+ * let reader = new BarCodeReader("test.png");
1995
+ * reader.setQualitySettings(QualitySettings.getNormalQuality());
1996
+ *
1997
+ * Value:
1998
+ * NormalQuality recognition quality preset.
1999
+ */
2000
+ static getNormalQuality()
2001
+ {
2002
+ let JavaQualitySettings = java.import(QualitySettings.javaClassName);
2003
+ return new QualitySettings(JavaQualitySettings.getNormalQualitySync());
2004
+ }
2005
+
2006
+ /**
2007
+ * HighQualityDetection recognition quality preset. Same as NormalQuality but with high quality DetectorSettings
2008
+ *
2009
+ * @example
2010
+ * let reader = new BarCodeReader("test.png");
2011
+ * reader.setQualitySettings(QualitySettings.getHighQualityDetection()); *
2012
+ *
2013
+ * Value:
2014
+ * HighQualityDetection recognition quality preset.
2015
+ */
2016
+ static getHighQualityDetection()
2017
+ {
2018
+ let JavaQualitySettings = java.import(QualitySettings.javaClassName);
2019
+ return new QualitySettings(JavaQualitySettings.getHighQualityDetectionSync());
2020
+ }
2021
+
2022
+ /**
2023
+ * MaxQualityDetection recognition quality preset. Same as NormalQuality but with highest quality DetectorSettings.
2024
+ * Allows to detect diagonal and damaged barcodes.
2025
+ *
2026
+ * @example
2027
+ *let reader = new BarCodeReader("test.png");
2028
+ * reader.setQualitySettings(QualitySettings.getMaxQualityDetection());
2029
+ *
2030
+ * Value:
2031
+ * MaxQualityDetection recognition quality preset.
2032
+ */
2033
+ static getMaxQualityDetection()
2034
+ {
2035
+ let JavaQualitySettings = java.import(QualitySettings.javaClassName);
2036
+ return new QualitySettings(JavaQualitySettings.getMaxQualityDetectionSync());
2037
+ }
2038
+
2039
+ /**
2040
+ * HighQuality recognition quality preset. This preset is developed for low quality barcodes.
2041
+ *
2042
+ * @example
2043
+ *let reader = new BarCodeReader("test.png");
2044
+ * reader.setQualitySettings(QualitySettings.getHighQuality());
2045
+ *
2046
+ * Value:
2047
+ * HighQuality recognition quality preset.
2048
+ */
2049
+ static getHighQuality()
2050
+ {
2051
+ let JavaQualitySettings = java.import(QualitySettings.javaClassName);
2052
+ return new QualitySettings(JavaQualitySettings.getHighQualitySync());
2053
+ }
2054
+
2055
+ /**
2056
+ * MaxBarCodes recognition quality preset. This preset is developed to recognize all possible barcodes, even incorrect barcodes.
2057
+ *
2058
+ * @example
2059
+ * let reader = new BarCodeReader("test.png");
2060
+ * reader.setQualitySettings(QualitySettings.getMaxBarCodes());
2061
+ *
2062
+ * Value:
2063
+ * MaxBarCodes recognition quality preset.
2064
+ */
2065
+ static getMaxBarCodes()
2066
+ {
2067
+ let JavaQualitySettings = java.import(QualitySettings.javaClassName);
2068
+ return new QualitySettings(JavaQualitySettings.getMaxBarCodesSync());
2069
+ }
2070
+
2071
+
2072
+ /**
2073
+ * Allows engine to recognize inverse color image as additional scan. Mode can be used when barcode is white on black background.
2074
+ * Value:
2075
+ * Allows engine to recognize inverse color image.
2076
+ */
2077
+ getAllowInvertImage()
2078
+ {
2079
+ return this.getJavaClass().getAllowInvertImageSync();
2080
+ }
2081
+
2082
+ /**
2083
+ * Allows engine to recognize inverse color image as additional scan. Mode can be used when barcode is white on black background.
2084
+ * Value:
2085
+ * Allows engine to recognize inverse color image.
2086
+ */
2087
+ setAllowInvertImage(value)
2088
+ {
2089
+ this.getJavaClass().setAllowInvertImageSync(value);
2090
+ }
2091
+
2092
+ /**
2093
+ * Allows engine to recognize barcodes which has incorrect checksumm or incorrect values.
2094
+ * Mode can be used to recognize damaged barcodes with incorrect text.
2095
+ * Value:
2096
+ * Allows engine to recognize incorrect barcodes.
2097
+ */
2098
+ getAllowIncorrectBarcodes()
2099
+ {
2100
+ return this.getJavaClass().getAllowIncorrectBarcodesSync();
2101
+ }
2102
+
2103
+ /**
2104
+ * Allows engine to recognize barcodes which has incorrect checksumm or incorrect values.
2105
+ * Mode can be used to recognize damaged barcodes with incorrect text.
2106
+ * Value:
2107
+ * Allows engine to recognize incorrect barcodes.
2108
+ */
2109
+ setAllowIncorrectBarcodes(value)
2110
+ {
2111
+ this.getJavaClass().setAllowIncorrectBarcodesSync(value);
2112
+ }
2113
+
2114
+ /**
2115
+ * Allows engine to recognize tiny barcodes on large images. Ignored if <see cref="AllowIncorrectBarcodes"/> is set to True. Default value: False.
2116
+ * @return If True, allows engine to recognize tiny barcodes on large images.
2117
+ */
2118
+ getReadTinyBarcodes()
2119
+ {
2120
+ return this.getJavaClass().getReadTinyBarcodesSync();
2121
+ }
2122
+
2123
+ /**
2124
+ * Allows engine to recognize tiny barcodes on large images. Ignored if <see cref="AllowIncorrectBarcodes"/> is set to True. Default value: False.
2125
+ * @param value If True, allows engine to recognize tiny barcodes on large images.
2126
+ */
2127
+ setReadTinyBarcodes(value)
2128
+ {
2129
+ this.getJavaClass().setReadTinyBarcodesSync(value);
2130
+ }
2131
+
2132
+ /**
2133
+ * Allows engine to recognize 1D barcodes with checksum by checking more recognition variants. Default value: False.
2134
+ * @return If True, allows engine to recognize 1D barcodes with checksum.
2135
+ */
2136
+ getCheckMore1DVariants()
2137
+ {
2138
+ return this.getJavaClass().getCheckMore1DVariantsSync();
2139
+ }
2140
+
2141
+ /**
2142
+ * Allows engine to recognize 1D barcodes with checksum by checking more recognition variants. Default value: False.
2143
+ * @param value If True, allows engine to recognize 1D barcodes with checksum.
2144
+ */
2145
+ setCheckMore1DVariants(value)
2146
+ {
2147
+ this.getJavaClass().setCheckMore1DVariantsSync(value);
2148
+ }
2149
+
2150
+ /**
2151
+ * Allows engine to recognize color barcodes on color background as additional scan. Extremely slow mode.
2152
+ * Value:
2153
+ * Allows engine to recognize color barcodes on color background.
2154
+ */
2155
+ getAllowComplexBackground()
2156
+ {
2157
+ return this.getJavaClass().getAllowComplexBackgroundSync();
2158
+ }
2159
+
2160
+ /**
2161
+ * Allows engine to recognize color barcodes on color background as additional scan. Extremely slow mode.
2162
+ * Value:v
2163
+ * Allows engine to recognize color barcodes on color background.
2164
+ */
2165
+ setAllowComplexBackground(value)
2166
+ {
2167
+ this.getJavaClass().setAllowComplexBackgroundSync(value);
2168
+ }
2169
+
2170
+ /**
2171
+ * Allows engine to enable median smoothing as additional scan. Mode helps to recognize noised barcodes.
2172
+ * Value:
2173
+ * Allows engine to enable median smoothing.
2174
+ */
2175
+ getAllowMedianSmoothing()
2176
+ {
2177
+ return this.getJavaClass().getAllowMedianSmoothingSync();
2178
+ }
2179
+
2180
+ /**
2181
+ * Allows engine to enable median smoothing as additional scan. Mode helps to recognize noised barcodes.
2182
+ * Value:
2183
+ * Allows engine to enable median smoothing.
2184
+ */
2185
+ setAllowMedianSmoothing(value)
2186
+ {
2187
+ this.getJavaClass().setAllowMedianSmoothingSync(value);
2188
+ }
2189
+
2190
+ /**
2191
+ * Window size for median smoothing. Typical values are 3 or 4. Default value is 3. AllowMedianSmoothing must be set.
2192
+ * Value:
2193
+ * Window size for median smoothing.
2194
+ */
2195
+ getMedianSmoothingWindowSize()
2196
+ {
2197
+ return this.getJavaClass().getMedianSmoothingWindowSizeSync();
2198
+ }
2199
+
2200
+ /**
2201
+ * Window size for median smoothing. Typical values are 3 or 4. Default value is 3. AllowMedianSmoothing must be set.
2202
+ * Value:
2203
+ * Window size for median smoothing.
2204
+ */
2205
+ setMedianSmoothingWindowSize(value)
2206
+ {
2207
+ this.getJavaClass().setMedianSmoothingWindowSizeSync(value);
2208
+ }
2209
+
2210
+ /**
2211
+ * Allows engine to recognize regular image without any restorations as main scan. Mode to recognize image as is.
2212
+ * Value:
2213
+ * Allows to recognize regular image without any restorations.
2214
+ */
2215
+
2216
+ getAllowRegularImage()
2217
+ {
2218
+ return this.getJavaClass().getAllowRegularImageSync();
2219
+ }
2220
+
2221
+ /**
2222
+ * Allows engine to recognize regular image without any restorations as main scan. Mode to recognize image as is.
2223
+ * Value:
2224
+ * Allows to recognize regular image without any restorations.
2225
+ */
2226
+
2227
+ setAllowRegularImage(value)
2228
+ {
2229
+ this.getJavaClass().setAllowRegularImageSync(value);
2230
+ }
2231
+
2232
+ /**
2233
+ * Allows engine to recognize decreased image as additional scan. Size for decreasing is selected by internal engine algorithms.
2234
+ * Mode helps to recognize barcodes which are noised and blurred but captured with high resolution.
2235
+ * Value:
2236
+ * Allows engine to recognize decreased image
2237
+ */
2238
+ getAllowDecreasedImage()
2239
+ {
2240
+ return this.getJavaClass().getAllowDecreasedImageSync();
2241
+ }
2242
+
2243
+ /**
2244
+ * Allows engine to recognize decreased image as additional scan. Size for decreasing is selected by internal engine algorithms.
2245
+ * Mode helps to recognize barcodes which are noised and blurred but captured with high resolution.
2246
+ * Value:
2247
+ * Allows engine to recognize decreased image
2248
+ */
2249
+ setAllowDecreasedImage(value)
2250
+ {
2251
+ this.getJavaClass().setAllowDecreasedImageSync(value);
2252
+ }
2253
+
2254
+ /**
2255
+ * Allows engine to recognize image without small white spots as additional scan. Mode helps to recognize noised image as well as median smoothing filtering.
2256
+ * Value:
2257
+ * Allows engine to recognize image without small white spots.
2258
+ */
2259
+
2260
+ getAllowWhiteSpotsRemoving()
2261
+ {
2262
+ return this.getJavaClass().getAllowWhiteSpotsRemovingSync();
2263
+ }
2264
+
2265
+ /**
2266
+ * Allows engine to recognize image without small white spots as additional scan. Mode helps to recognize noised image as well as median smoothing filtering.
2267
+ * Value:
2268
+ * Allows engine to recognize image without small white spots.
2269
+ */
2270
+ setAllowWhiteSpotsRemoving(value)
2271
+ {
2272
+ this.getJavaClass().setAllowWhiteSpotsRemovingSync(value);
2273
+ }
2274
+
2275
+ /**
2276
+ * Allows engine for 1D barcodes to recognize regular image with different params as additional scan. Mode helps to recongize low height 1D barcodes.
2277
+ * Value:
2278
+ * Allows engine for 1D barcodes to run additional scan.
2279
+ */
2280
+ getAllowOneDAdditionalScan()
2281
+ {
2282
+ return this.getJavaClass().getAllowOneDAdditionalScanSync();
2283
+ }
2284
+
2285
+ /**
2286
+ * Allows engine for 1D barcodes to recognize regular image with different params as additional scan. Mode helps to recongize low height 1D barcodes.
2287
+ * Value:
2288
+ * Allows engine for 1D barcodes to run additional scan.
2289
+ */
2290
+ setAllowOneDAdditionalScan(value)
2291
+ {
2292
+ this.getJavaClass().setAllowOneDAdditionalScanSync(value);
2293
+ }
2294
+
2295
+ /**
2296
+ * Allows engine for 1D barcodes to quickly recognize high quality barcodes which fill almost whole image.
2297
+ * Mode helps to quickly recognize generated barcodes from Internet.
2298
+ * Value:
2299
+ * Allows engine for 1D barcodes to quickly recognize high quality barcodes.
2300
+ */
2301
+ getAllowOneDFastBarcodesDetector()
2302
+ {
2303
+ return this.getJavaClass().getAllowOneDFastBarcodesDetectorSync();
2304
+ }
2305
+
2306
+ /**
2307
+ * Allows engine for 1D barcodes to quickly recognize high quality barcodes which fill almost whole image.
2308
+ * Mode helps to quickly recognize generated barcodes from Internet.
2309
+ * Value:
2310
+ * Allows engine for 1D barcodes to quickly recognize high quality barcodes.
2311
+ */
2312
+ setAllowOneDFastBarcodesDetector(value)
2313
+ {
2314
+ this.getJavaClass().setAllowOneDFastBarcodesDetectorSync(value);
2315
+ }
2316
+
2317
+ /**
2318
+ * Allows engine for Postal barcodes to recognize slightly noised images. Mode helps to recognize sligtly damaged Postal barcodes.
2319
+ * Value:
2320
+ * Allows engine for Postal barcodes to recognize slightly noised images.
2321
+ */
2322
+ getAllowMicroWhiteSpotsRemoving()
2323
+ {
2324
+ return this.getJavaClass().getAllowMicroWhiteSpotsRemovingSync();
2325
+ }
2326
+
2327
+ /**
2328
+ * Allows engine for Postal barcodes to recognize slightly noised images. Mode helps to recognize sligtly damaged Postal barcodes.
2329
+ * Value:
2330
+ * Allows engine for Postal barcodes to recognize slightly noised images.
2331
+ */
2332
+ setAllowMicroWhiteSpotsRemoving(value)
2333
+ {
2334
+ this.getJavaClass().setAllowMicroWhiteSpotsRemovingSync(value);
2335
+ }
2336
+
2337
+ /**
2338
+ * Allows engine for 1D barcodes to quickly recognize middle slice of an image and return result without using any time-consuming algorithms.
2339
+ * @return Allows engine for 1D barcodes to quickly recognize high quality barcodes.
2340
+ */
2341
+ getFastScanOnly()
2342
+ {
2343
+ return this.getJavaClass().getFastScanOnlySync();
2344
+ }
2345
+
2346
+ /**
2347
+ * Allows engine for 1D barcodes to quickly recognize middle slice of an image and return result without using any time-consuming algorithms.
2348
+ * @param value Allows engine for 1D barcodes to quickly recognize high quality barcodes.
2349
+ */
2350
+ setFastScanOnly(value)
2351
+ {
2352
+ this.getJavaClass().setFastScanOnlySync(value);
2353
+ }
2354
+
2355
+ /**
2356
+ * Allows engine to recognize barcodes with salt and paper noise type. Mode can remove small noise with white and black dots.
2357
+ * Value:
2358
+ * Allows engine to recognize barcodes with salt and paper noise type.
2359
+ */
2360
+ getAllowSaltAndPaperFiltering()
2361
+ {
2362
+ return this.getJavaClass().getAllowSaltAndPaperFilteringSync();
2363
+ }
2364
+
2365
+ /**
2366
+ * Allows engine to recognize barcodes with salt and paper noise type. Mode can remove small noise with white and black dots.
2367
+ * Value:
2368
+ * Allows engine to recognize barcodes with salt and paper noise type.
2369
+ */
2370
+ setAllowSaltAndPaperFiltering(value)
2371
+ {
2372
+ this.getJavaClass().setAllowSaltAndPaperFilteringSync(value);
2373
+ }
2374
+
2375
+ /**
2376
+ * Allows engine to use gap between scans to increase recognition speed. Mode can make recognition problems with low height barcodes.
2377
+ * Value:
2378
+ * Allows engine to use gap between scans to increase recognition speed.
2379
+ */
2380
+ getAllowDetectScanGap()
2381
+ {
2382
+ return this.getJavaClass().getAllowDetectScanGapSync();
2383
+ }
2384
+
2385
+ /**
2386
+ * Allows engine to use gap between scans to increase recognition speed. Mode can make recognition problems with low height barcodes.
2387
+ * Value:
2388
+ * Allows engine to use gap between scans to increase recognition speed.
2389
+ */
2390
+ setAllowDetectScanGap(value)
2391
+ {
2392
+ this.getJavaClass().setAllowDetectScanGapSync(value);
2393
+ }
2394
+
2395
+ /**
2396
+ * Allows engine for Datamatrix to recognize dashed industrial Datamatrix barcodes.
2397
+ * Slow mode which helps only for dashed barcodes which consist from spots.
2398
+ * Value:
2399
+ * Allows engine for Datamatrix to recognize dashed industrial barcodes.
2400
+ */
2401
+ getAllowDatamatrixIndustrialBarcodes()
2402
+ {
2403
+ return this.getJavaClass().getAllowDatamatrixIndustrialBarcodesSync();
2404
+ }
2405
+
2406
+ /**
2407
+ * Allows engine for Datamatrix to recognize dashed industrial Datamatrix barcodes.
2408
+ * Slow mode which helps only for dashed barcodes which consist from spots.
2409
+ * Value:
2410
+ * Allows engine for Datamatrix to recognize dashed industrial barcodes.
2411
+ */
2412
+ setAllowDatamatrixIndustrialBarcodes(value)
2413
+ {
2414
+ this.getJavaClass().setAllowDatamatrixIndustrialBarcodesSync(value);
2415
+ }
2416
+
2417
+ /**
2418
+ * Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes.
2419
+ * Value:
2420
+ * Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes.
2421
+ */
2422
+ getAllowQRMicroQrRestoration()
2423
+ {
2424
+ return this.getJavaClass().getAllowQRMicroQrRestorationSync();
2425
+ }
2426
+
2427
+ /**
2428
+ * Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes.
2429
+ * Value:
2430
+ * Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes.
2431
+ */
2432
+ setAllowQRMicroQrRestoration(value)
2433
+ {
2434
+ this.getJavaClass().setAllowQRMicroQrRestorationSync(value);
2435
+ }
2436
+
2437
+ /**
2438
+ * Allows engine for 1D barcodes to recognize barcodes with single wiped/glued bars in pattern.
2439
+ * Value:
2440
+ * Allows engine for 1D barcodes to recognize barcodes with single wiped/glued bars in pattern.
2441
+ */
2442
+ getAllowOneDWipedBarsRestoration()
2443
+ {
2444
+ return this.getJavaClass().getAllowOneDWipedBarsRestorationSync();
2445
+ }
2446
+
2447
+ /**
2448
+ * Allows engine for 1D barcodes to recognize barcodes with single wiped/glued bars in pattern.
2449
+ * Value:
2450
+ * Allows engine for 1D barcodes to recognize barcodes with single wiped/glued bars in pattern.
2451
+ */
2452
+ setAllowOneDWipedBarsRestoration(value)
2453
+ {
2454
+ this.getJavaClass().setAllowOneDWipedBarsRestorationSync(value);
2455
+ }
2456
+
2457
+ /**
2458
+ * Barcode detector settings.
2459
+ */
2460
+ getDetectorSettings()
2461
+ {
2462
+ return this.detectorSettings;
2463
+ }
2464
+
2465
+ /**
2466
+ * Barcode detector settings.
2467
+ */
2468
+ setDetectorSettings(value)
2469
+ {
2470
+ this.getJavaClass().setDetectorSettingsSync(value);
2471
+ this.detectorSettings = value;
2472
+ }
2473
+
2474
+ /**
2475
+ * apply all values from Src setting to this
2476
+ * @param Src source settings
2477
+ */
2478
+ applyAll(Src)
2479
+ {
2480
+ this.setAllowInvertImage(Src.getAllowInvertImage());
2481
+ this.setAllowIncorrectBarcodes(Src.getAllowIncorrectBarcodes());
2482
+ this.setAllowComplexBackground(Src.getAllowComplexBackground());
2483
+ this.setAllowMedianSmoothing(Src.getAllowMedianSmoothing());
2484
+ this.setMedianSmoothingWindowSize(Src.getMedianSmoothingWindowSize());
2485
+ this.setAllowRegularImage(Src.getAllowRegularImage());
2486
+ this.setAllowDecreasedImage(Src.getAllowDecreasedImage());
2487
+ this.setAllowWhiteSpotsRemoving(Src.getAllowWhiteSpotsRemoving());
2488
+ this.setAllowOneDAdditionalScan(Src.getAllowOneDAdditionalScan());
2489
+ this.setAllowOneDFastBarcodesDetector(Src.getAllowOneDFastBarcodesDetector());
2490
+ this.setAllowMicroWhiteSpotsRemoving(Src.getAllowMicroWhiteSpotsRemoving());
2491
+ this.setAllowSaltAndPaperFiltering(Src.getAllowSaltAndPaperFiltering());
2492
+ this.setAllowDetectScanGap(Src.getAllowDetectScanGap());
2493
+ }
2494
+ }
2495
+
2496
+ /**
2497
+ * Contains the data of subtype for Code128 type barcode
2498
+ */
2499
+ class Code128DataPortion extends joint.BaseJavaClass
2500
+ {
2501
+ static get javaClassName()
2502
+ {
2503
+ return "com.aspose.mw.barcode.recognition.MwCode128DataPortion";
2504
+ }
2505
+
2506
+ /**
2507
+ * Creates a new instance of the {@code Code128DataPortion} class with start code symbol and decoded codetext.
2508
+ *
2509
+ * @param code128SubType A start encoding symbol
2510
+ * @param data A partial codetext
2511
+ */
2512
+ constructor(code128SubType, data)
2513
+ {
2514
+ let java_link = java.import(Code128DataPortion.javaClassName);
2515
+ let code128DataPortion = new java_link(code128SubType + "", data);
2516
+ super(code128DataPortion);
2517
+ this.init();
2518
+ }
2519
+
2520
+ static construct(javaClass)
2521
+ {
2522
+ let code128DataPortion = new Code128DataPortion(0, "");
2523
+ code128DataPortion.setJavaClass(javaClass);
2524
+ return code128DataPortion;
2525
+ }
2526
+
2527
+ /**
2528
+ * Gets the part of code text related to subtype.
2529
+ *
2530
+ * @return The part of code text related to subtype
2531
+ */
2532
+ getData()
2533
+ {
2534
+ return this.getJavaClass().getDataSync();
2535
+ }
2536
+
2537
+ /**
2538
+ * Gets the part of code text related to subtype.
2539
+ *
2540
+ * @return The part of code text related to subtype
2541
+ */
2542
+ setData(value)
2543
+ {
2544
+ this.getJavaClass().setDataSync(value);
2545
+ }
2546
+
2547
+ /**
2548
+ * Gets the type of Code128 subset
2549
+ *
2550
+ * @return The type of Code128 subset
2551
+ */
2552
+ getCode128SubType()
2553
+ {
2554
+ return this.getJavaClass().getCode128SubTypeSync();
2555
+ }
2556
+
2557
+ /**
2558
+ * Gets the type of Code128 subset
2559
+ *
2560
+ * @return The type of Code128 subset
2561
+ */
2562
+ setCode128SubType(value)
2563
+ {
2564
+ this.getJavaClass().setCode128SubTypeSync(value);
2565
+ }
2566
+
2567
+ init()
2568
+ {
2569
+ }
2570
+
2571
+ /**
2572
+ * Returns a human-readable string representation of this {@code Code128DataPortion}.
2573
+ * @return A string that represents this {@code Code128DataPortion}.
2574
+ */
2575
+ toString()
2576
+ {
2577
+ return this.getJavaClass().toStringSync();
2578
+ }
2579
+ }
2580
+
2581
+ /**
2582
+ * Stores a DataBar additional information of recognized barcode
2583
+ *@example
2584
+ * let reader = new BarCodeReader("c:\\test.png", DecodeType.DATABAR_OMNI_DIRECTIONAL);
2585
+ * reader.readBarCodes().forEach(function(result, i, results)
2586
+ * {
2587
+ * console.log("BarCode Type: " + result.getCodeTypeName());
2588
+ * console.log("BarCode CodeText: " + result.getCodeText());
2589
+ * console.log("QR Structured Append Quantity: " + result.getExtended().getQR().getQRStructuredAppendModeBarCodesQuantity());
2590
+ * });
2591
+ */
2592
+ class DataBarExtendedParameters extends joint.BaseJavaClass
2593
+ {
2594
+
2595
+ init()
2596
+ {
2597
+ // TODO: Implement init() method.
2598
+ }
2599
+
2600
+ /**
2601
+ * Gets the DataBar 2D composite component flag. Default value is false.
2602
+ * @return The DataBar 2D composite component flag.
2603
+ */
2604
+ is2DCompositeComponent()
2605
+ {
2606
+ return this.getJavaClass().is2DCompositeComponentSync();
2607
+ }
2608
+
2609
+ /**
2610
+ * Returns a value indicating whether this instance is equal to a specified DataBarExtendedParameters value.<br>
2611
+ * @param obj DataBarExtendedParameters value to compare to this instance.<br>
2612
+ * @return true if obj has the same value as this instance; otherwise, false<br>.
2613
+ */
2614
+ equals(obj)
2615
+ {
2616
+ return this.getJavaClass().equalsSync(obj.getJavaClass());
2617
+ }
2618
+
2619
+ /**
2620
+ * Returns the hash code for this instance.
2621
+ * @return A 32-bit signed integer hash code.
2622
+ */
2623
+ hashcode()
2624
+ {
2625
+ return this.getJavaClass().hashcodeSync();
2626
+ }
2627
+
2628
+ /**
2629
+ * Returns a human-readable string representation of this <see cref="DataBarExtendedParameters"/>.
2630
+ * @return A string that represents this <see cref="DataBarExtendedParameters"/>.
2631
+ */
2632
+ toString()
2633
+ {
2634
+ return this.getJavaClass().toStringSync();
2635
+ }
2636
+ }
2637
+
2638
+ /**
2639
+ * AustraliaPost decoding parameters. Contains parameters which make influence on recognized data of AustraliaPost symbology.
2640
+ */
2641
+ class AustraliaPostSettings extends joint.BaseJavaClass
2642
+ {
2643
+ static get javaClassName()
2644
+ {
2645
+ return "com.aspose.mw.barcode.recognition.MwAustraliaPostSettings";
2646
+ }
2647
+
2648
+ init()
2649
+ {
2650
+ }
2651
+
2652
+ /**
2653
+ * AustraliaPostSettings constructor
2654
+ */
2655
+ constructor(settings)
2656
+ {
2657
+ if (settings != null)
2658
+ {
2659
+ super(settings.getJavaClass());
2660
+ } else
2661
+ {
2662
+ let java_link = java.import(AustraliaPostSettings.javaClassName);
2663
+ let australiaPostSettings = new java_link();
2664
+ super(australiaPostSettings);
2665
+ }
2666
+ }
2667
+
2668
+ static construct(javaClass)
2669
+ {
2670
+ let australiaPostSettings = new AustraliaPostSettings(null);
2671
+ australiaPostSettings.setJavaClass(javaClass);
2672
+ return australiaPostSettings;
2673
+ }
2674
+
2675
+ /**
2676
+ * Gets or sets the Interpreting Type for the Customer Information of AustralianPost BarCode.DEFAULT is CustomerInformationInterpretingType.OTHER.
2677
+ * @return The interpreting type (CTable, NTable or Other) of customer information for AustralianPost BarCode
2678
+ */
2679
+ getCustomerInformationInterpretingType()
2680
+ {
2681
+ return this.getJavaClass().getCustomerInformationInterpretingTypeSync();
2682
+ }
2683
+
2684
+ /**
2685
+ * Gets or sets the Interpreting Type for the Customer Information of AustralianPost BarCode.DEFAULT is CustomerInformationInterpretingType.OTHER.
2686
+ * @param value The interpreting type (CTable, NTable or Other) of customer information for AustralianPost BarCode
2687
+ */
2688
+ setCustomerInformationInterpretingType(value)
2689
+ {
2690
+ this.getJavaClass().setCustomerInformationInterpretingTypeSync(value);
2691
+ }
2692
+
2693
+ /**
2694
+ * The flag which force AustraliaPost decoder to ignore last filling patterns in Customer Information Field during decoding as CTable method.
2695
+ * CTable encoding method does not have any gaps in encoding table and sequnce "333" of filling paterns is decoded as letter "z".
2696
+ *
2697
+ * Example
2698
+ *
2699
+ * let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, "5912345678AB");
2700
+ * generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.C_TABLE);
2701
+ * let image = generator.generateBarCodeImage(BarcodeImageFormat.PNG);
2702
+ * let reader = new BarCodeReader(image, null, DecodeType.AUSTRALIA_POST);
2703
+ * reader.getBarcodeSettings().getAustraliaPost().setCustomerInformationInterpretingType(CustomerInformationInterpretingType.C_TABLE);
2704
+ * reader.getBarcodeSettings().getAustraliaPost().setIgnoreEndingFillingPatternsForCTable(true);
2705
+ * reader.readBarCodes().forEach(function(result, i, results)
2706
+ * {
2707
+ * console.log("BarCode Type: ".result.getCodeType());
2708
+ * console.log("BarCode CodeText: ".result.getCodeText());
2709
+ * });
2710
+ *
2711
+ * @return The flag which force AustraliaPost decoder to ignore last filling patterns during CTable method decoding
2712
+ */
2713
+ getIgnoreEndingFillingPatternsForCTable()
2714
+ {
2715
+ return this.getJavaClass().getIgnoreEndingFillingPatternsForCTableSync();
2716
+ }
2717
+
2718
+ setIgnoreEndingFillingPatternsForCTable(value)
2719
+ {
2720
+ this.getJavaClass().setIgnoreEndingFillingPatternsForCTableSync(value);
2721
+ }
2722
+ }
2723
+
2724
+ class BarcodeSettings extends joint.BaseJavaClass
2725
+ {
2726
+
2727
+ _australiaPost;
2728
+
2729
+ static get javaClassName()
2730
+ {
2731
+ return "com.aspose.mw.barcode.recognition.MwBarcodeSettings";
2732
+ }
2733
+
2734
+ /**
2735
+ * BarcodeSettings copy constructor
2736
+ * @param settings The source of the data
2737
+ */
2738
+ constructor(settings)
2739
+ {
2740
+ if (settings != null)
2741
+ {
2742
+ super(settings.getJavaClass());
2743
+ } else
2744
+ {
2745
+ let java_link = java.import(BarcodeSettings.javaClassName);
2746
+ let barcodeSettings = new java_link();
2747
+ super(barcodeSettings);
2748
+ }
2749
+ }
2750
+
2751
+ /**
2752
+ * BarcodeSettings copy constructor
2753
+ * @param settings The source of the data
2754
+ */
2755
+ static construct(javaClass)
2756
+ {
2757
+ let barcodeSettings = new BarcodeSettings(null);
2758
+ barcodeSettings.setJavaClass(javaClass);
2759
+ return barcodeSettings;
2760
+ }
2761
+
2762
+ init()
2763
+ {
2764
+ this._australiaPost = AustraliaPostSettings.construct(this.getJavaClass().getAustraliaPostSync());
2765
+ }
2766
+
2767
+ /**
2768
+ * Enable checksum validation during recognition for 1D and Postal barcodes.
2769
+ * Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible.
2770
+ * Checksum never used: Codabar, PatchCode, Pharmacode, DataLogic2of5
2771
+ * Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, ItalianPost25, Matrix2of5, MSI, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN
2772
+ * Checksum always used: Rest symbologies
2773
+ *
2774
+ * Example
2775
+ *
2776
+ * let generator = new BarcodeGenerator(EncodeTypes.EAN_13, "1234567890128");
2777
+ * generator.save("c:/test.png", BarcodeImageFormat.PNG);
2778
+ * let reader = new BarCodeReader("c:/test.png", DecodeType.EAN_13);
2779
+ * //checksum disabled
2780
+ * reader.getBarcodeSettings().setChecksumValidation(ChecksumValidation.OFF);
2781
+ * reader.readBarCodes().forEach(function(result, i, results)
2782
+ * {
2783
+ * console.log ("BarCode CodeText: ".result.getCodeText());
2784
+ * console.log ("BarCode Value: " + result.getExtended().getOneD().getValue());
2785
+ * console.log ("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
2786
+ * });
2787
+ * let reader = new BarCodeReader("c:/test.png", DecodeType.EAN_13);
2788
+ * //checksum enabled
2789
+ * reader.getBarcodeSettings().setChecksumValidation(ChecksumValidation.ON);
2790
+ * reader.readBarCodes().forEach(function(result, i, results)
2791
+ * {
2792
+ * console.log ("BarCode CodeText: " + result.CodeText);
2793
+ * console.log ("BarCode Value: " + result.getExtended().getOneD().getValue());
2794
+ * console.log ("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
2795
+ * });
2796
+ * @return Enable checksum validation during recognition for 1D and Postal barcodes.
2797
+ */
2798
+ getChecksumValidation()
2799
+ {
2800
+ return this.getJavaClass().getChecksumValidationSync();
2801
+ }
2802
+
2803
+ /**
2804
+ * Enable checksum validation during recognition for 1D and Postal barcodes.
2805
+ * Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible.
2806
+ * Checksum never used: Codabar, PatchCode, Pharmacode, DataLogic2of5
2807
+ * Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, ItalianPost25, Matrix2of5, MSI, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN
2808
+ * Checksum always used: Rest symbologies
2809
+ *
2810
+ * Example
2811
+ *
2812
+ * let generator = new BarcodeGenerator(EncodeTypes.EAN_13, "1234567890128");
2813
+ * generator.save("c:/test.png", BarcodeImageFormat.PNG);
2814
+ * let reader = new BarCodeReader("c:/test.png", DecodeType.EAN_13);
2815
+ * //checksum disabled
2816
+ * reader.getBarcodeSettings().setChecksumValidation(ChecksumValidation.OFF);
2817
+ * reader.readBarCodes().forEach(function(result, i, results)
2818
+ * {
2819
+ * console.log ("BarCode CodeText: ".result.getCodeText());
2820
+ * console.log ("BarCode Value: " + result.getExtended().getOneD().getValue());
2821
+ * console.log ("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
2822
+ * });
2823
+ * let reader = new BarCodeReader("c:/test.png", DecodeType.EAN_13);
2824
+ * //checksum enabled
2825
+ * reader.getBarcodeSettings().setChecksumValidation(ChecksumValidation.ON);
2826
+ * reader.readBarCodes().forEach(function(result, i, results)
2827
+ * {
2828
+ * console.log ("BarCode CodeText: " + result.CodeText);
2829
+ * console.log ("BarCode Value: " + result.getExtended().getOneD().getValue());
2830
+ * console.log ("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
2831
+ * });
2832
+ * @param value Enable checksum validation during recognition for 1D and Postal barcodes.
2833
+ */
2834
+ setChecksumValidation(value)
2835
+ {
2836
+ this.getJavaClass().setChecksumValidationSync(value);
2837
+ }
2838
+
2839
+ /**
2840
+ * Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.
2841
+ *
2842
+ * Example
2843
+ *
2844
+ * let generator = new BarcodeGenerator(EncodeTypes.GS_1_CODE_128, "(02)04006664241007(37)1(400)7019590754");
2845
+ * generator.save("c:/test.png", BarcodeImageFormat.PNG);
2846
+ * let reader = new BarCodeReader("c:/test.png", DecodeType.CODE_128);
2847
+ *
2848
+ * //StripFNC disabled
2849
+ * reader.getBarcodeSettings().setStripFNC(false);
2850
+ * reader.readBarCodes().forEach(function(result, i, results)
2851
+ * {
2852
+ * console.log ("BarCode CodeText: ".result.getCodeText());
2853
+ * });
2854
+ *
2855
+ * let reader = new BarCodeReader("c:/test.png", DecodeType.CODE_128);
2856
+ *
2857
+ * //StripFNC enabled
2858
+ * reader.getBarcodeSettings().setStripFNC(true);
2859
+ * reader.readBarCodes().forEach(function(result, i, results)
2860
+ * {
2861
+ * console.log ("BarCode CodeText: ".result.getCodeText());
2862
+ * });
2863
+ *
2864
+ * @return Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.
2865
+ */
2866
+ getStripFNC()
2867
+ {
2868
+ return this.getJavaClass().getStripFNCSync();
2869
+ }
2870
+
2871
+ /**
2872
+ * Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.
2873
+ *
2874
+ * Example
2875
+ *
2876
+ * let generator = new BarcodeGenerator(EncodeTypes.GS_1_CODE_128, "(02)04006664241007(37)1(400)7019590754");
2877
+ * generator.save("c:/test.png", BarcodeImageFormat.PNG);
2878
+ * let reader = new BarCodeReader("c:/test.png", DecodeType.CODE_128);
2879
+ *
2880
+ * //StripFNC disabled
2881
+ * reader.getBarcodeSettings().setStripFNC(false);
2882
+ * reader.readBarCodes().forEach(function(result, i, results)
2883
+ * {
2884
+ * console.log ("BarCode CodeText: ".result.getCodeText());
2885
+ * });
2886
+ *
2887
+ * let reader = new BarCodeReader("c:/test.png", DecodeType.CODE_128);
2888
+ *
2889
+ * //StripFNC enabled
2890
+ * reader.getBarcodeSettings().setStripFNC(true);
2891
+ * reader.readBarCodes().forEach(function(result, i, results)
2892
+ * {
2893
+ * console.log ("BarCode CodeText: ".result.getCodeText());
2894
+ * });
2895
+ *
2896
+ * @param value Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.
2897
+ */
2898
+ setStripFNC(value)
2899
+ {
2900
+ this.getJavaClass().setStripFNCSync(value);
2901
+ }
2902
+
2903
+ /**
2904
+ * The flag which force engine to detect codetext encoding for Unicode codesets. Default value is true.
2905
+ *
2906
+ * Example
2907
+ *
2908
+ * let generator = new BarcodeGenerator(EncodeTypes.QR, "Đ¡Đ»Đ¾Đ²Đ¾"))
2909
+ * $im = generator.generateBarcodeImage(BarcodeImageFormat.PNG);
2910
+ *
2911
+ * //detects encoding for Unicode codesets is enabled
2912
+ * let reader = new BarCodeReader(im, DecodeType.QR);
2913
+ * reader.getBarcodeSettings().setDetectEncoding(true);
2914
+ * reader.readBarCodes().forEach(function(result, i, results)
2915
+ * {
2916
+ * console.log ("BarCode CodeText: ".result.getCodeText());
2917
+ * });
2918
+ * //detect encoding is disabled
2919
+ * let reader = new BarCodeReader(im, DecodeType.QR);
2920
+ * reader.getBarcodeSettings().setDetectEncoding(false);
2921
+ * reader.readBarCodes().forEach(function(result, i, results)
2922
+ * console.log ("BarCode CodeText: " + result.getCodeText());
2923
+ *
2924
+ * @return The flag which force engine to detect codetext encoding for Unicode codesets
2925
+ */
2926
+ getDetectEncoding()
2927
+ {
2928
+ return this.getJavaClass().getDetectEncodingSync();
2929
+ }
2930
+
2931
+ setDetectEncoding(value)
2932
+ {
2933
+ this.getJavaClass().setDetectEncodingSync(value);
2934
+ }
2935
+
2936
+ /**
2937
+ * Gets AustraliaPost decoding parameters
2938
+ * @return The AustraliaPost decoding parameters which make influence on recognized data of AustraliaPost symbology
2939
+ */
2940
+ getAustraliaPost()
2941
+ {
2942
+ return this._australiaPost;
2943
+ }
2944
+ }
2945
+
2946
+ class RecognitionAbortedException extends Error
2947
+ {
2948
+ javaClass;
2949
+
2950
+ static get javaClassName()
2951
+ {
2952
+ return "com.aspose.mw.barcode.recognition.MwRecognitionAbortedException";
2953
+ }
2954
+ /**
2955
+ * Gets the execution time of current recognition session
2956
+ * @return The execution time of current recognition session
2957
+ */
2958
+ getExecutionTime()
2959
+ {
2960
+ return this.javaClass.getExecutionTimeSync();
2961
+ }
2962
+
2963
+ /**
2964
+ * Sets the execution time of current recognition session
2965
+ * @param value The execution time of current recognition session
2966
+ */
2967
+ setExecutionTime(value)
2968
+ {
2969
+ this.javaClass.setExecutionTimeSync(value);
2970
+ }
2971
+
2972
+ /**
2973
+ * Initializes a new instance of the <see cref="RecognitionAbortedException" /> class with specified recognition abort message.
2974
+ * @param message The error message of the exception.
2975
+ * @param executionTime The execution time of current recognition session.
2976
+ */
2977
+ constructor(message, executionTime)
2978
+ {
2979
+ super(message);
2980
+ let java_class_link = new java.import(RecognitionAbortedException.javaClassName);
2981
+ if(message != null && executionTime != null)
2982
+ {
2983
+ this.javaClass = new java_class_link(message, executionTime);
2984
+ }
2985
+ else if (executionTime != null)
2986
+ {
2987
+ this.javaClass = new java_class_link(executionTime);
2988
+ }
2989
+ else
2990
+ this.javaClass = new java_class_link();
2991
+ }
2992
+
2993
+ static construct(javaClass)
2994
+ {
2995
+ let exception = new RecognitionAbortedException(null, null);
2996
+ exception.javaClass = javaClass;
2997
+ return exception;
2998
+ }
2999
+
3000
+ init()
3001
+ {
3002
+
3003
+ }
3004
+ }
3005
+
3006
+ /**
3007
+ * Specify the type of barcode to read.
3008
+ * @example
3009
+ * //This sample shows how to detect Code39 and Code128 barcodes.
3010
+ * let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
3011
+ * reader.readBarCodes().forEach(function(result, i, results)
3012
+ * {
3013
+ * console.log("BarCode Type: " + result.getCodeTypeName());
3014
+ * console.log("BarCode CodeText: " + result.getCodeText());
3015
+ * });
3016
+ *
3017
+ * @enum
3018
+ */
3019
+ DecodeType =
3020
+ {
3021
+ /**
3022
+ * Unspecified decode type.
3023
+ */
3024
+ NONE: -1,
3025
+
3026
+ /**
3027
+ * Specifies that the data should be decoded with {@code <b>CODABAR</b>} barcode specification
3028
+ */
3029
+ CODABAR: 0,
3030
+
3031
+ /**
3032
+ * Specifies that the data should be decoded with {@code <b>CODE 11</b>} barcode specification
3033
+ */
3034
+ CODE_11: 1,
3035
+
3036
+ /**
3037
+ * Specifies that the data should be decoded with {@code <b>Standard CODE 39</b>} barcode specification
3038
+ */
3039
+ CODE_39_STANDARD: 2,
3040
+
3041
+ /**
3042
+ * Specifies that the data should be decoded with {@code <b>Extended CODE 39</b>} barcode specification
3043
+ */
3044
+ CODE_39_EXTENDED: 3,
3045
+
3046
+ /**
3047
+ * Specifies that the data should be decoded with {@code <b>Standard CODE 93</b>} barcode specification
3048
+ */
3049
+ CODE_93_STANDARD: 4,
3050
+
3051
+ /**
3052
+ * Specifies that the data should be decoded with {@code <b>Extended CODE 93</b>} barcode specification
3053
+ */
3054
+ CODE_93_EXTENDED: 5,
3055
+
3056
+ /**
3057
+ * Specifies that the data should be decoded with {@code <b>CODE 128</b>} barcode specification
3058
+ */
3059
+ CODE_128: 6,
3060
+
3061
+ /**
3062
+ * Specifies that the data should be decoded with {@code <b>GS1 CODE 128</b>} barcode specification
3063
+ */
3064
+ GS_1_CODE_128: 7,
3065
+
3066
+ /**
3067
+ * Specifies that the data should be decoded with {@code <b>EAN-8</b>} barcode specification
3068
+ */
3069
+ EAN_8: 8,
3070
+
3071
+ /**
3072
+ * Specifies that the data should be decoded with {@code <b>EAN-13</b>} barcode specification
3073
+ */
3074
+ EAN_13: 9,
3075
+
3076
+ /**
3077
+ * Specifies that the data should be decoded with {@code <b>EAN14</b>} barcode specification
3078
+ */
3079
+ EAN_14: 10,
3080
+
3081
+ /**
3082
+ * Specifies that the data should be decoded with {@code <b>SCC14</b>} barcode specification
3083
+ */
3084
+ SCC_14: 11,
3085
+
3086
+ /**
3087
+ * Specifies that the data should be decoded with {@code <b>SSCC18</b>} barcode specification
3088
+ */
3089
+ SSCC_18: 12,
3090
+
3091
+ /**
3092
+ * Specifies that the data should be decoded with {@code <b>UPC-A</b>} barcode specification
3093
+ */
3094
+ UPCA: 13,
3095
+
3096
+ /**
3097
+ * Specifies that the data should be decoded with {@code <b>UPC-E</b>} barcode specification
3098
+ */
3099
+ UPCE: 14,
3100
+
3101
+ /**
3102
+ * Specifies that the data should be decoded with {@code <b>ISBN</b>} barcode specification
3103
+ */
3104
+ ISBN: 15,
3105
+
3106
+ /**
3107
+ * Specifies that the data should be decoded with {@code <b>Standard 2 of 5</b>} barcode specification
3108
+ */
3109
+ STANDARD_2_OF_5: 16,
3110
+
3111
+ /**
3112
+ * Specifies that the data should be decoded with {@code <b>INTERLEAVED 2 of 5</b>} barcode specification
3113
+ */
3114
+ INTERLEAVED_2_OF_5: 17,
3115
+
3116
+ /**
3117
+ * Specifies that the data should be decoded with {@code <b>Matrix 2 of 5</b>} barcode specification
3118
+ */
3119
+ MATRIX_2_OF_5: 18,
3120
+
3121
+ /**
3122
+ * Specifies that the data should be decoded with {@code <b>Italian Post 25</b>} barcode specification
3123
+ */
3124
+ ITALIAN_POST_25: 19,
3125
+
3126
+ /**
3127
+ * Specifies that the data should be decoded with {@code <b>IATA 2 of 5</b>} barcode specification. IATA (International Air Transport Association) uses this barcode for the management of air cargo.
3128
+ */
3129
+ IATA_2_OF_5: 20,
3130
+
3131
+ /**
3132
+ * Specifies that the data should be decoded with {@code <b>ITF14</b>} barcode specification
3133
+ */
3134
+ ITF_14: 21,
3135
+
3136
+ /**
3137
+ * Specifies that the data should be decoded with {@code <b>ITF6</b>} barcode specification
3138
+ */
3139
+ ITF_6: 22,
3140
+
3141
+ /**
3142
+ * Specifies that the data should be decoded with {@code <b>MSI Plessey</b>} barcode specification
3143
+ */
3144
+ MSI: 23,
3145
+
3146
+ /**
3147
+ * Specifies that the data should be decoded with {@code <b>VIN</b>} (Vehicle Identification Number) barcode specification
3148
+ */
3149
+ VIN: 24,
3150
+
3151
+ /**
3152
+ * Specifies that the data should be decoded with {@code <b>DeutschePost Ident code</b>} barcode specification
3153
+ */
3154
+ DEUTSCHE_POST_IDENTCODE: 25,
3155
+
3156
+ /**
3157
+ * Specifies that the data should be decoded with {@code <b>DeutschePost Leit code</b>} barcode specification
3158
+ */
3159
+ DEUTSCHE_POST_LEITCODE: 26,
3160
+
3161
+ /**
3162
+ * Specifies that the data should be decoded with {@code <b>OPC</b>} barcode specification
3163
+ */
3164
+ OPC: 27,
3165
+
3166
+ /**
3167
+ * Specifies that the data should be decoded with {@code <b>PZN</b>} barcode specification. This symbology is also known as Pharma Zentral Nummer
3168
+ */
3169
+ PZN: 28,
3170
+
3171
+ /**
3172
+ * Specifies that the data should be decoded with {@code <b>Pharmacode</b>} barcode. This symbology is also known as Pharmaceutical BINARY Code
3173
+ */
3174
+ PHARMACODE: 29,
3175
+
3176
+ /**
3177
+ * Specifies that the data should be decoded with {@code <b>DataMatrix</b>} barcode symbology
3178
+ */
3179
+ DATA_MATRIX: 30,
3180
+
3181
+ /**
3182
+ * Specifies that the data should be decoded with {@code <b>GS1DataMatrix</b>} barcode symbology
3183
+ */
3184
+ GS_1_DATA_MATRIX: 31,
3185
+
3186
+ /**
3187
+ * Specifies that the data should be decoded with {@code <b>QR Code</b>} barcode specification
3188
+ */
3189
+ QR: 32,
3190
+
3191
+ /**
3192
+ * Specifies that the data should be decoded with {@code <b>Aztec</b>} barcode specification
3193
+ */
3194
+ AZTEC: 33,
3195
+
3196
+ /**
3197
+ * Specifies that the data should be decoded with {@code <b>Pdf417</b>} barcode symbology
3198
+ */
3199
+ PDF_417: 34,
3200
+
3201
+ /**
3202
+ * Specifies that the data should be decoded with {@code <b>MacroPdf417</b>} barcode specification
3203
+ */
3204
+ MACRO_PDF_417: 35,
3205
+
3206
+ /**
3207
+ * Specifies that the data should be decoded with {@code <b>MicroPdf417</b>} barcode specification
3208
+ */
3209
+ MICRO_PDF_417: 36,
3210
+
3211
+ /**
3212
+ * Specifies that the data should be decoded with {@code <b>CodablockF</b>} barcode specification
3213
+ */
3214
+ CODABLOCK_F: 65,
3215
+ /**
3216
+ * Specifies that the data should be decoded with <b>Royal Mail Mailmark</b> barcode specification.
3217
+ */
3218
+ MAILMARK: 66,
3219
+
3220
+ /**
3221
+ * Specifies that the data should be decoded with {@code <b>Australia Post</b>} barcode specification
3222
+ */
3223
+ AUSTRALIA_POST: 37,
3224
+
3225
+ /**
3226
+ * Specifies that the data should be decoded with {@code <b>Postnet</b>} barcode specification
3227
+ */
3228
+ POSTNET: 38,
3229
+
3230
+ /**
3231
+ * Specifies that the data should be decoded with {@code <b>Planet</b>} barcode specification
3232
+ */
3233
+ PLANET: 39,
3234
+
3235
+ /**
3236
+ * Specifies that the data should be decoded with USPS {@code <b>OneCode</b>} barcode specification
3237
+ */
3238
+ ONE_CODE: 40,
3239
+
3240
+ /**
3241
+ * Specifies that the data should be decoded with {@code <b>RM4SCC</b>} barcode specification. RM4SCC (Royal Mail 4-state Customer Code) is used for automated mail sort process in UK.
3242
+ */
3243
+ RM_4_SCC: 41,
3244
+
3245
+ /**
3246
+ * Specifies that the data should be decoded with {@code <b>GS1 DATABAR omni-directional</b>} barcode specification
3247
+ */
3248
+ DATABAR_OMNI_DIRECTIONAL: 42,
3249
+
3250
+ /**
3251
+ * Specifies that the data should be decoded with {@code <b>GS1 DATABAR truncated</b>} barcode specification
3252
+ */
3253
+ DATABAR_TRUNCATED: 43,
3254
+
3255
+ /**
3256
+ * Specifies that the data should be decoded with {@code <b>GS1 DATABAR limited</b>} barcode specification
3257
+ */
3258
+ DATABAR_LIMITED: 44,
3259
+
3260
+ /**
3261
+ * Specifies that the data should be decoded with {@code <b>GS1 DATABAR expanded</b>} barcode specification
3262
+ */
3263
+ DATABAR_EXPANDED: 45,
3264
+
3265
+ /**
3266
+ * Specifies that the data should be decoded with {@code <b>GS1 DATABAR stacked omni-directional</b>} barcode specification
3267
+ */
3268
+ DATABAR_STACKED_OMNI_DIRECTIONAL: 53,
3269
+
3270
+ /**
3271
+ * Specifies that the data should be decoded with {@code <b>GS1 DATABAR stacked</b>} barcode specification
3272
+ */
3273
+ DATABAR_STACKED: 54,
3274
+
3275
+ /**
3276
+ * Specifies that the data should be decoded with {@code <b>GS1 DATABAR expanded stacked</b>} barcode specification
3277
+ */
3278
+ DATABAR_EXPANDED_STACKED: 55,
3279
+
3280
+ /**
3281
+ * Specifies that the data should be decoded with {@code <b>Patch code</b>} barcode specification. Barcode symbology is used for automated scanning
3282
+ */
3283
+ PATCH_CODE: 46,
3284
+
3285
+ /**
3286
+ * Specifies that the data should be decoded with {@code <b>ISSN</b>} barcode specification
3287
+ */
3288
+ ISSN: 47,
3289
+
3290
+ /**
3291
+ * Specifies that the data should be decoded with {@code <b>ISMN</b>} barcode specification
3292
+ */
3293
+ ISMN: 48,
3294
+
3295
+ /**
3296
+ * Specifies that the data should be decoded with {@code <b>Supplement(EAN2, EAN5)</b>} barcode specification
3297
+ */
3298
+ SUPPLEMENT: 49,
3299
+
3300
+ /**
3301
+ * Specifies that the data should be decoded with {@code <b>Australian Post Domestic eParcel Barcode</b>} barcode specification
3302
+ */
3303
+ AUSTRALIAN_POSTE_PARCEL: 50,
3304
+
3305
+ /**
3306
+ * Specifies that the data should be decoded with {@code <b>Swiss Post Parcel Barcode</b>} barcode specification
3307
+ */
3308
+ SWISS_POST_PARCEL: 51,
3309
+
3310
+ /**
3311
+ * Specifies that the data should be decoded with {@code <b>SCode16K</b>} barcode specification
3312
+ */
3313
+ CODE_16_K: 52,
3314
+
3315
+ /**
3316
+ * Specifies that the data should be decoded with {@code <b>MicroQR Code</b>} barcode specification
3317
+ */
3318
+ MICRO_QR: 56,
3319
+
3320
+ /**
3321
+ * Specifies that the data should be decoded with {@code <b>CompactPdf417</b>} (Pdf417Truncated) barcode specification
3322
+ */
3323
+ COMPACT_PDF_417: 57,
3324
+
3325
+ /**
3326
+ * Specifies that the data should be decoded with {@code <b>GS1 QR</b>} barcode specification
3327
+ */
3328
+ GS_1_QR: 58,
3329
+
3330
+ /**
3331
+ * Specifies that the data should be decoded with {@code <b>MaxiCode</b>} barcode specification
3332
+ */
3333
+ MAXI_CODE: 59,
3334
+
3335
+ /**
3336
+ * Specifies that the data should be decoded with {@code <b>MICR E-13B</b>} blank specification
3337
+ */
3338
+ MICR_E_13_B: 60,
3339
+
3340
+ /**
3341
+ * Specifies that the data should be decoded with {@code <b>Code32</b>} blank specification
3342
+ */
3343
+ CODE_32: 61,
3344
+
3345
+ /**
3346
+ * Specifies that the data should be decoded with {@code <b>DataLogic 2 of 5</b>} blank specification
3347
+ */
3348
+ DATA_LOGIC_2_OF_5: 62,
3349
+
3350
+ /**
3351
+ * Specifies that the data should be decoded with {@code <b>DotCode</b>} blank specification
3352
+ */
3353
+ DOT_CODE: 63,
3354
+
3355
+ /**
3356
+ * Specifies that the data should be decoded with {@code <b>DotCode</b>} blank specification
3357
+ */
3358
+ DUTCH_KIX: 64,
3359
+
3360
+ /**
3361
+ * Specifies that data will be checked with all available symbologies
3362
+ */
3363
+ ALL_SUPPORTED_TYPES: 71,
3364
+
3365
+ /**
3366
+ * Specifies that data will be checked with all of 1D barcode symbologies
3367
+ */
3368
+ TYPES_1D: 67,
3369
+
3370
+ /**
3371
+ * Specifies that data will be checked with all of 1.5D POSTAL barcode symbologies, like Planet, Postnet, AustraliaPost, OneCode, RM4SCC, DutchKIX
3372
+ */
3373
+ POSTAL_TYPES: 68,
3374
+
3375
+ /**
3376
+ * Specifies that data will be checked with most commonly used symbologies
3377
+ */
3378
+ MOST_COMMON_TYPES: 69,
3379
+
3380
+ /**
3381
+ * Specifies that data will be checked with all of <b>2D</b> barcode symbologies
3382
+ */
3383
+ TYPES_2D: 70,
3384
+
3385
+ javaClassName: "com.aspose.mw.barcode.recognition.MwDecodeTypeUtils",
3386
+
3387
+ /**
3388
+ * Determines if the specified BaseDecodeType contains any 1D barcode symbology
3389
+ * @param symbology
3390
+ * @return true if BaseDecodeType contains any 1D barcode symbology; otherwise, returns false
3391
+ */
3392
+ is1D(symbology)
3393
+ {
3394
+ let javaClass = new java(DecodeType.javaClassName);
3395
+ return javaClass.is1DSync(symbology);
3396
+ },
3397
+
3398
+ /**
3399
+ * Determines if the specified BaseDecodeType contains any Postal barcode symbology
3400
+ * @param symbology BaseDecodeType to test
3401
+ * @return true if BaseDecodeType contains any Postal barcode symbology; otherwise, returns false
3402
+ */
3403
+ isPostal(symbology)
3404
+ {
3405
+ let javaClass = new java(DecodeType.javaClassName);
3406
+ return javaClass.isPostalSync(symbology);
3407
+ },
3408
+
3409
+ /**
3410
+ * Determines if the specified BaseDecodeType contains any 2D barcode symbology
3411
+ * @param symbology BaseDecodeType to test.
3412
+ * @return true if BaseDecodeType contains any 2D barcode symbology; otherwise, returns false
3413
+ */
3414
+ is2D(symbology)
3415
+ {
3416
+ let javaClass = new java(DecodeType.javaClassName);
3417
+ return javaClass.is2DSync(symbology);
3418
+ },
3419
+
3420
+ containsAny(decodeType, ...decodeTypes)
3421
+ {
3422
+ let javaClass = new java(DecodeType.javaClassName);
3423
+ return javaClass.containsAnySync(...decodeTypes);
3424
+ }
3425
+ };
3426
+
3427
+ /**
3428
+ * @enum
3429
+ */
3430
+ Code128SubType =
3431
+ {
3432
+ /**
3433
+ * ASCII characters 00 to 95 (0–9, A–Z and control codes), special characters, and FNC 1–4 ///
3434
+ */
3435
+ CODE_SET_A: 1,
3436
+
3437
+ /**
3438
+ * ASCII characters 32 to 127 (0–9, A–Z, a–z), special characters, and FNC 1–4 ///
3439
+ */
3440
+ CODE_SET_B: 2,
3441
+
3442
+ /**
3443
+ * 00–99 (encodes two digits with a single code point) and FNC1 ///
3444
+ */
3445
+ CODE_SET_C: 3,
3446
+ };
3447
+
3448
+ /**
3449
+ * Defines the interpreting type(C_TABLE or N_TABLE) of customer information for AustralianPost BarCode.
3450
+ * @example
3451
+ * let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, "5912345678ABCde");
3452
+ * generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.C_TABLE);
3453
+ * image = generator.generateBarCodeImage();
3454
+ * let reader = new BarCodeReader(image, DecodeType.AUSTRALIA_POST);
3455
+ * reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.C_TABLE);
3456
+ * reader.readBarCodes().forEach(function(result, i, results)
3457
+ * {
3458
+ * console.log("BarCode Type: " + result.getCodeType());
3459
+ * console.log("BarCode CodeText: " + result.getCodeText());
3460
+ * });
3461
+ *
3462
+ *@example
3463
+ * generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, "59123456781234567");
3464
+ * generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.N_TABLE);
3465
+ * image = generator.generateBarCodeImage();
3466
+ * reader = new BarCodeReader(image, DecodeType.AUSTRALIA_POST);
3467
+ * reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.N_TABLE);
3468
+ * reader.readBarCodes().forEach(function(result, i, results)
3469
+ * {
3470
+ * console.log("BarCode Type: " + result.getCodeType());
3471
+ * console.log("BarCode CodeText: " + result.getCodeText());
3472
+ * });
3473
+ *
3474
+ * @example
3475
+ * let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, "59123456780123012301230123");
3476
+ * generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.OTHER);
3477
+ * image = generator.generateBarCodeImage();
3478
+ * let reader = new BarCodeReader(image, DecodeType.AUSTRALIA_POST);
3479
+ * reader.CustomerInformationInterpretingType = CustomerInformationInterpretingType.OTHER);
3480
+ * reader.readBarCodes().forEach(function(result, i, results)
3481
+ * {
3482
+ * console.log("BarCode Type: " + result.getCodeType());
3483
+ * console.log("BarCode CodeText: " + result.getCodeText());
3484
+ * });
3485
+ *
3486
+ * @enum
3487
+ */
3488
+ CustomerInformationInterpretingType =
3489
+ {
3490
+
3491
+ /**
3492
+ * Use C_TABLE to interpret the customer information. Allows A..Z, a..z, 1..9, space and # sing.
3493
+ *
3494
+ * @code
3495
+ * let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, "5912345678ABCde");
3496
+ * generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.C_TABLE);
3497
+ * let image = generator.generateBarcodeImage(BarcodeImageFormat.PNG);
3498
+ * let reader = new BarCodeReader(image, DecodeType.AUSTRALIA_POST);
3499
+ * reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.C_TABLE);
3500
+ * reader.readBarCodes().forEach(function(result, i, results)
3501
+ * {
3502
+ * print("BarCode Type: " + result.getCodeType());
3503
+ * print("BarCode CodeText: " + result.getCodeText());
3504
+ * });
3505
+ * @endcode
3506
+ */
3507
+ C_TABLE: 0,
3508
+
3509
+ /**
3510
+ * Use N_TABLE to interpret the customer information. Allows digits.
3511
+ *
3512
+ * @code
3513
+ * let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, "59123456781234567");
3514
+ * generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.N_TABLE);
3515
+ * let image = generator.generateBarcodeImage(BarcodeImageFormat.PNG);
3516
+ * let reader = new BarCodeReader(image, DecodeType.AUSTRALIA_POST);
3517
+ * reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.N_TABLE);
3518
+ * reader.readBarCodes().forEach(function(result, i, results)
3519
+ * {
3520
+ * print("BarCode Type: " + result.getCodeType());
3521
+ * print("BarCode CodeText: " + result.getCodeText());
3522
+ * });
3523
+ * @endcode
3524
+ */
3525
+ N_TABLE: 1,
3526
+ /**
3527
+ * Do not interpret the customer information. Allows 0, 1, 2 or 3 symbol only.
3528
+ *
3529
+ * @code
3530
+ * let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, "59123456780123012301230123");
3531
+ * generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.OTHER);
3532
+ * let image = generator.generateBarcodeImage(BarcodeImageFormat.PNG);
3533
+ * let reader = new BarCodeReader(image, DecodeType.AUSTRALIA_POST);
3534
+ * reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.OTHER));
3535
+ * reader.readBarCodes().forEach(function(result, i, results)
3536
+ * {
3537
+ * print("BarCode Type: " + result.getCodeType());
3538
+ * print("BarCode CodeText: " + result.getCodeText());
3539
+ * });
3540
+ * @endcode
3541
+ */
3542
+ OTHER: 2,
3543
+ };
3544
+
3545
+ /**
3546
+ * Contains recognition confidence level
3547
+ *@example
3548
+ * //This sample shows how BarCodeConfidence changed, depending on barcode type
3549
+ * //Moderate confidence
3550
+ * let generator = new BarcodeGenerator(EncodeTypes.CODE_128, "12345");
3551
+ * generator.save("test.png");
3552
+ * let reader = new BarCodeReader("test.png", null, [DecodeType.CODE_39_STANDARD, DecodeType.CODE_128]);
3553
+ * reader.readBarCodes().forEach(function(result, i, results)
3554
+ * {
3555
+ * console.log("BarCode Type: " + result.getCodeTypeName());
3556
+ * console.log("BarCode CodeText: " + result.getCodeText());
3557
+ * console.log("BarCode Confidence: " + result.getConfidence());
3558
+ * console.log("BarCode ReadingQuality: " + result.getReadingQuality());
3559
+ * });
3560
+ * //Strong confidence
3561
+ * let generator = new BarcodeGenerator(EncodeTypes.QR, "12345");
3562
+ * generator.save("test.png");
3563
+ * let reader = new BarCodeReader("test.png", null, [DecodeType.CODE_39_STANDARD, DecodeType.QR]);
3564
+ * reader.readBarCodes().forEach(function(result, i, results)
3565
+ * {
3566
+ * console.log("BarCode Type: " + result.getCodeTypeName());
3567
+ * console.log("BarCode CodeText: " + result.getCodeText());
3568
+ * console.log("BarCode Confidence: " + result.getConfidence());
3569
+ * console.log("BarCode ReadingQuality: " + result.getReadingQuality());
3570
+ * });
3571
+ *
3572
+ * @enum
3573
+ */
3574
+ BarCodeConfidence =
3575
+ {
3576
+ /**
3577
+ * Recognition confidence of barcode where codetext was not recognized correctly or barcode was detected as posible fake
3578
+ */
3579
+ NONE: 0,
3580
+
3581
+ /**
3582
+ * Recognition confidence of barcode (mostly 1D barcodes) with weak checksumm or even without it. Could contains some misrecognitions in codetext
3583
+ * or even fake recognitions if is low
3584
+ *
3585
+ * @see BarCodeResult.ReadingQuality
3586
+ */
3587
+ MODERATE: 80,
3588
+
3589
+ /**
3590
+ * Recognition confidence which was confirmed with BCH codes like Reed–Solomon. There must not be errors in read codetext or fake recognitions
3591
+ */
3592
+ STRONG: 100
3593
+ };
3594
+
3595
+ module.exports = {
3596
+ BarCodeReader,
3597
+ Quadrangle,
3598
+ QRExtendedParameters,
3599
+ Pdf417ExtendedParameters,
3600
+ OneDExtendedParameters,
3601
+ Code128ExtendedParameters,
3602
+ BarcodeSvmDetectorSettings,
3603
+ DecodeType,
3604
+ BarCodeResult,
3605
+ BarCodeRegionParameters,
3606
+ BarCodeExtendedParameters,
3607
+ QualitySettings,
3608
+ BarCodeConfidence,
3609
+ Code128SubType,
3610
+ Code128DataPortion,
3611
+ DataBarExtendedParameters,
3612
+ AustraliaPostSettings,
3613
+ BarcodeSettings,
3614
+ CustomerInformationInterpretingType,
3615
+ RecognitionAbortedException
3616
+ };