aspose.barcode 21.8.5 → 21.11.5

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.
@@ -7,7 +7,7 @@ const recognition_ = require("./Recognition");
7
7
 
8
8
  function pushJar()
9
9
  {
10
- java.classpath.push(__dirname + "/aspose-barcode-nodejs-21.8.jar");
10
+ java.classpath.push(__dirname + "/aspose-barcode-nodejs-21.11.jar");
11
11
  }
12
12
  pushJar();
13
13
 
@@ -531,7 +531,7 @@ QrBillStandardVersion =
531
531
  * Version 2.0
532
532
  *
533
533
  */
534
- V2_0: "0"
534
+ V2_0: 0
535
535
  };
536
536
 
537
537
  /**
@@ -1277,5 +1277,6 @@ module.exports = {
1277
1277
  AddressType,
1278
1278
  SwissQRBill,
1279
1279
  Mailmark2DCodetext,
1280
- Mailmark2DType
1280
+ Mailmark2DType,
1281
+ QrBillStandardVersion
1281
1282
  };
package/lib/Generation.js CHANGED
@@ -902,7 +902,7 @@ ChecksumValidation =
902
902
  /**
903
903
  * If checksum is required by the specification - it will be validated.
904
904
  */
905
- _default: 0,
905
+ DEFAULT: 0,
906
906
 
907
907
  /**
908
908
  * Always validate checksum if possible.
@@ -16,9 +16,8 @@ const joint = require("./Joint");
16
16
  class BarCodeReader extends joint.BaseJavaClass
17
17
  {
18
18
  qualitySettings;
19
- barcodeRegion;
20
- code128DataPortions;
21
19
  recognizedResults;
20
+ barcodeSettings;
22
21
 
23
22
  static get javaClassName()
24
23
  {
@@ -68,7 +67,11 @@ class BarCodeReader extends joint.BaseJavaClass
68
67
  try
69
68
  {
70
69
  let java_class_link = new java.import(BarCodeReader.javaClassName);
71
- let java_class = new java_class_link(image, rectangles, decodeTypes);
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);
72
75
  super(java_class);
73
76
  this.init()
74
77
  } catch (e)
@@ -78,6 +81,13 @@ class BarCodeReader extends joint.BaseJavaClass
78
81
  }
79
82
  }
80
83
 
84
+ static construct(javaClass)
85
+ {
86
+ let barcodeReader = new BarCodeReader(null, null, null);
87
+ barcodeReader.setJavaClass(javaClass);
88
+ return barcodeReader;
89
+ }
90
+
81
91
  static isPath(image)
82
92
  {
83
93
  if (image.length < 256 && image.includes("/") || image.includes("\\"))
@@ -152,6 +162,7 @@ class BarCodeReader extends joint.BaseJavaClass
152
162
  init()
153
163
  {
154
164
  this.qualitySettings = new QualitySettings(this.getJavaClass().getQualitySettingsSync());
165
+ this.barcodeSettings = BarcodeSettings.construct(this.getJavaClass().getBarcodeSettingsSync());
155
166
  }
156
167
 
157
168
  /**
@@ -387,13 +398,24 @@ class BarCodeReader extends joint.BaseJavaClass
387
398
  */
388
399
  readBarCodes()
389
400
  {
390
- this.recognizedResults = [];
391
- let javaReadBarcodes = this.getJavaClass().readBarCodesSync();
392
- for (let i = 0; i < javaReadBarcodes.length; i++)
401
+ try
402
+ {
403
+ this.recognizedResults = [];
404
+ let javaReadBarcodes = this.getJavaClass().readBarCodesSync();
405
+ for (let i = 0; i < javaReadBarcodes.length; i++)
406
+ {
407
+ this.recognizedResults[i] = new BarCodeResult(javaReadBarcodes[i]);
408
+ }
409
+ return this.recognizedResults;
410
+ }
411
+ catch (e)
393
412
  {
394
- this.recognizedResults[i] = new BarCodeResult(javaReadBarcodes[i]);
413
+ if((e.toString().includes("RecognitionAbortedException")))
414
+ {
415
+ throw new RecognitionAbortedException(e.toString(), null);
416
+ }
417
+ throw e;
395
418
  }
396
- return this.recognizedResults;
397
419
  }
398
420
 
399
421
  /**
@@ -474,6 +496,15 @@ class BarCodeReader extends joint.BaseJavaClass
474
496
  this.getJavaClass().setQualitySettingsSync(value.getJavaClass());
475
497
  }
476
498
 
499
+ /**
500
+ * The main BarCode decoding parameters. Contains parameters which make influence on recognized data.
501
+ * @return The main BarCode decoding parameters
502
+ */
503
+ getBarcodeSettings()
504
+ {
505
+ return this.barcodeSettings;
506
+ }
507
+
477
508
  /**
478
509
  * A flag which force engine to detect codetext encoding for Unicode codesets.
479
510
  * @example
@@ -619,7 +650,39 @@ class BarCodeReader extends joint.BaseJavaClass
619
650
  */
620
651
  exportToXml(xmlFile)
621
652
  {
622
- return this.getJavaClass().exportToXmlSync(xmlFile);
653
+ try
654
+ {
655
+ let xmlData = this.getJavaClass().exportToXmlSync();
656
+ let isSaved = xmlData != null;
657
+ if(isSaved)
658
+ fs.writeFileSync(xmlFile, xmlData);
659
+ return isSaved;
660
+ }
661
+ catch (ex)
662
+ {
663
+ let barcode_exception = new joint.BarcodeException(ex);
664
+ throw barcode_exception;
665
+ }
666
+ }
667
+
668
+ /**
669
+ * Exports BarCode properties to the xml-file specified
670
+ * @param xmlFile The name for the file
671
+ * @return Whether or not export completed successfully. Returns True in case of success; False Otherwise
672
+ */
673
+ static importFromXml(xmlFile)
674
+ {
675
+ try
676
+ {
677
+ let xmlData = fs.readFileSync(xmlFile).toString();
678
+ let java_class_link = new java.import(BarCodeReader.javaClassName);
679
+ return BarCodeReader.construct(java_class_link.importFromXmlSync(xmlData.substring(3, xmlData.length)));
680
+ }
681
+ catch (ex)
682
+ {
683
+ let barcode_exception = new joint.BarcodeException(ex);
684
+ throw barcode_exception;
685
+ }
623
686
  }
624
687
  }
625
688
 
@@ -2105,7 +2168,7 @@ class QualitySettings extends joint.BaseJavaClass
2105
2168
 
2106
2169
  /**
2107
2170
  * Allows engine to recognize 1D barcodes with checksum by checking more recognition variants. Default value: False.
2108
- * @param $value If True, allows engine to recognize 1D barcodes with checksum.
2171
+ * @param value If True, allows engine to recognize 1D barcodes with checksum.
2109
2172
  */
2110
2173
  setCheckMore1DVariants(value)
2111
2174
  {
@@ -2299,6 +2362,24 @@ class QualitySettings extends joint.BaseJavaClass
2299
2362
  this.getJavaClass().setAllowMicroWhiteSpotsRemovingSync(value);
2300
2363
  }
2301
2364
 
2365
+ /**
2366
+ * Allows engine for 1D barcodes to quickly recognize middle slice of an image and return result without using any time-consuming algorithms.
2367
+ * @return Allows engine for 1D barcodes to quickly recognize high quality barcodes.
2368
+ */
2369
+ getFastScanOnly()
2370
+ {
2371
+ return this.getJavaClass().getFastScanOnlySync();
2372
+ }
2373
+
2374
+ /**
2375
+ * Allows engine for 1D barcodes to quickly recognize middle slice of an image and return result without using any time-consuming algorithms.
2376
+ * @param value Allows engine for 1D barcodes to quickly recognize high quality barcodes.
2377
+ */
2378
+ setFastScanOnly(value)
2379
+ {
2380
+ this.getJavaClass().setFastScanOnlySync(value);
2381
+ }
2382
+
2302
2383
  /**
2303
2384
  * Allows engine to recognize barcodes with salt and paper noise type. Mode can remove small noise with white and black dots.
2304
2385
  * Value:
@@ -2582,6 +2663,374 @@ class DataBarExtendedParameters extends joint.BaseJavaClass
2582
2663
  }
2583
2664
  }
2584
2665
 
2666
+ /**
2667
+ * AustraliaPost decoding parameters. Contains parameters which make influence on recognized data of AustraliaPost symbology.
2668
+ */
2669
+ class AustraliaPostSettings extends joint.BaseJavaClass
2670
+ {
2671
+ static get javaClassName()
2672
+ {
2673
+ return "com.aspose.mw.barcode.recognition.MwAustraliaPostSettings";
2674
+ }
2675
+
2676
+ init()
2677
+ {
2678
+ }
2679
+
2680
+ /**
2681
+ * AustraliaPostSettings constructor
2682
+ */
2683
+ constructor(settings)
2684
+ {
2685
+ if (settings != null)
2686
+ {
2687
+ super(settings.getJavaClass());
2688
+ } else
2689
+ {
2690
+ let java_link = java.import(AustraliaPostSettings.javaClassName);
2691
+ let australiaPostSettings = new java_link();
2692
+ super(australiaPostSettings);
2693
+ }
2694
+ }
2695
+
2696
+ static construct(javaClass)
2697
+ {
2698
+ let australiaPostSettings = new AustraliaPostSettings(null);
2699
+ australiaPostSettings.setJavaClass(javaClass);
2700
+ return australiaPostSettings;
2701
+ }
2702
+
2703
+ /**
2704
+ * Gets or sets the Interpreting Type for the Customer Information of AustralianPost BarCode.DEFAULT is CustomerInformationInterpretingType.OTHER.
2705
+ * @return The interpreting type (CTable, NTable or Other) of customer information for AustralianPost BarCode
2706
+ */
2707
+ getCustomerInformationInterpretingType()
2708
+ {
2709
+ return this.getJavaClass().getCustomerInformationInterpretingTypeSync();
2710
+ }
2711
+
2712
+ /**
2713
+ * Gets or sets the Interpreting Type for the Customer Information of AustralianPost BarCode.DEFAULT is CustomerInformationInterpretingType.OTHER.
2714
+ * @param value The interpreting type (CTable, NTable or Other) of customer information for AustralianPost BarCode
2715
+ */
2716
+ setCustomerInformationInterpretingType(value)
2717
+ {
2718
+ this.getJavaClass().setCustomerInformationInterpretingTypeSync(value);
2719
+ }
2720
+
2721
+ /**
2722
+ * The flag which force AustraliaPost decoder to ignore last filling patterns in Customer Information Field during decoding as CTable method.
2723
+ * CTable encoding method does not have any gaps in encoding table and sequnce "333" of filling paterns is decoded as letter "z".
2724
+ *
2725
+ * Example
2726
+ *
2727
+ * let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, "5912345678AB");
2728
+ * generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.C_TABLE);
2729
+ * let image = generator.generateBarCodeImage(BarcodeImageFormat.PNG);
2730
+ * let reader = new BarCodeReader(image, null, DecodeType.AUSTRALIA_POST);
2731
+ * reader.getBarcodeSettings().getAustraliaPost().setCustomerInformationInterpretingType(CustomerInformationInterpretingType.C_TABLE);
2732
+ * reader.getBarcodeSettings().getAustraliaPost().setIgnoreEndingFillingPatternsForCTable(true);
2733
+ * reader.readBarCodes().forEach(function(result, i, results)
2734
+ * {
2735
+ * console.log("BarCode Type: ".result.getCodeType());
2736
+ * console.log("BarCode CodeText: ".result.getCodeText());
2737
+ * });
2738
+ *
2739
+ * @return The flag which force AustraliaPost decoder to ignore last filling patterns during CTable method decoding
2740
+ */
2741
+ getIgnoreEndingFillingPatternsForCTable()
2742
+ {
2743
+ return this.getJavaClass().getIgnoreEndingFillingPatternsForCTableSync();
2744
+ }
2745
+
2746
+ setIgnoreEndingFillingPatternsForCTable(value)
2747
+ {
2748
+ this.getJavaClass().setIgnoreEndingFillingPatternsForCTableSync(value);
2749
+ }
2750
+ }
2751
+
2752
+ class BarcodeSettings extends joint.BaseJavaClass
2753
+ {
2754
+
2755
+ _australiaPost;
2756
+
2757
+ static get javaClassName()
2758
+ {
2759
+ return "com.aspose.mw.barcode.recognition.MwBarcodeSettings";
2760
+ }
2761
+
2762
+ /**
2763
+ * BarcodeSettings copy constructor
2764
+ * @param settings The source of the data
2765
+ */
2766
+ constructor(settings)
2767
+ {
2768
+ if (settings != null)
2769
+ {
2770
+ super(settings.getJavaClass());
2771
+ } else
2772
+ {
2773
+ let java_link = java.import(BarcodeSettings.javaClassName);
2774
+ let barcodeSettings = new java_link();
2775
+ super(barcodeSettings);
2776
+ }
2777
+ }
2778
+
2779
+ /**
2780
+ * BarcodeSettings copy constructor
2781
+ * @param settings The source of the data
2782
+ */
2783
+ static construct(javaClass)
2784
+ {
2785
+ let barcodeSettings = new BarcodeSettings(null);
2786
+ barcodeSettings.setJavaClass(javaClass);
2787
+ return barcodeSettings;
2788
+ }
2789
+
2790
+ init()
2791
+ {
2792
+ this._australiaPost = AustraliaPostSettings.construct(this.getJavaClass().getAustraliaPostSync());
2793
+ }
2794
+
2795
+ /**
2796
+ * Enable checksum validation during recognition for 1D and Postal barcodes.
2797
+ * Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible.
2798
+ * Checksum never used: Codabar, PatchCode, Pharmacode, DataLogic2of5
2799
+ * Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, ItalianPost25, Matrix2of5, MSI, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN
2800
+ * Checksum always used: Rest symbologies
2801
+ *
2802
+ * Example
2803
+ *
2804
+ * let generator = new BarcodeGenerator(EncodeTypes.EAN_13, "1234567890128");
2805
+ * generator.save("c:/test.png", BarcodeImageFormat.PNG);
2806
+ * let reader = new BarCodeReader("c:/test.png", DecodeType.EAN_13);
2807
+ * //checksum disabled
2808
+ * reader.getBarcodeSettings().setChecksumValidation(ChecksumValidation.OFF);
2809
+ * reader.readBarCodes().forEach(function(result, i, results)
2810
+ * {
2811
+ * console.log ("BarCode CodeText: ".result.getCodeText());
2812
+ * console.log ("BarCode Value: " + result.getExtended().getOneD().getValue());
2813
+ * console.log ("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
2814
+ * });
2815
+ * let reader = new BarCodeReader("c:/test.png", DecodeType.EAN_13);
2816
+ * //checksum enabled
2817
+ * reader.getBarcodeSettings().setChecksumValidation(ChecksumValidation.ON);
2818
+ * reader.readBarCodes().forEach(function(result, i, results)
2819
+ * {
2820
+ * console.log ("BarCode CodeText: " + result.CodeText);
2821
+ * console.log ("BarCode Value: " + result.getExtended().getOneD().getValue());
2822
+ * console.log ("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
2823
+ * });
2824
+ * @return Enable checksum validation during recognition for 1D and Postal barcodes.
2825
+ */
2826
+ getChecksumValidation()
2827
+ {
2828
+ return this.getJavaClass().getChecksumValidationSync();
2829
+ }
2830
+
2831
+ /**
2832
+ * Enable checksum validation during recognition for 1D and Postal barcodes.
2833
+ * Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible.
2834
+ * Checksum never used: Codabar, PatchCode, Pharmacode, DataLogic2of5
2835
+ * Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, ItalianPost25, Matrix2of5, MSI, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN
2836
+ * Checksum always used: Rest symbologies
2837
+ *
2838
+ * Example
2839
+ *
2840
+ * let generator = new BarcodeGenerator(EncodeTypes.EAN_13, "1234567890128");
2841
+ * generator.save("c:/test.png", BarcodeImageFormat.PNG);
2842
+ * let reader = new BarCodeReader("c:/test.png", DecodeType.EAN_13);
2843
+ * //checksum disabled
2844
+ * reader.getBarcodeSettings().setChecksumValidation(ChecksumValidation.OFF);
2845
+ * reader.readBarCodes().forEach(function(result, i, results)
2846
+ * {
2847
+ * console.log ("BarCode CodeText: ".result.getCodeText());
2848
+ * console.log ("BarCode Value: " + result.getExtended().getOneD().getValue());
2849
+ * console.log ("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
2850
+ * });
2851
+ * let reader = new BarCodeReader("c:/test.png", DecodeType.EAN_13);
2852
+ * //checksum enabled
2853
+ * reader.getBarcodeSettings().setChecksumValidation(ChecksumValidation.ON);
2854
+ * reader.readBarCodes().forEach(function(result, i, results)
2855
+ * {
2856
+ * console.log ("BarCode CodeText: " + result.CodeText);
2857
+ * console.log ("BarCode Value: " + result.getExtended().getOneD().getValue());
2858
+ * console.log ("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
2859
+ * });
2860
+ * @param value Enable checksum validation during recognition for 1D and Postal barcodes.
2861
+ */
2862
+ setChecksumValidation(value)
2863
+ {
2864
+ this.getJavaClass().setChecksumValidationSync(value);
2865
+ }
2866
+
2867
+ /**
2868
+ * Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.
2869
+ *
2870
+ * Example
2871
+ *
2872
+ * let generator = new BarcodeGenerator(EncodeTypes.GS_1_CODE_128, "(02)04006664241007(37)1(400)7019590754");
2873
+ * generator.save("c:/test.png", BarcodeImageFormat.PNG);
2874
+ * let reader = new BarCodeReader("c:/test.png", DecodeType.CODE_128);
2875
+ *
2876
+ * //StripFNC disabled
2877
+ * reader.getBarcodeSettings().setStripFNC(false);
2878
+ * reader.readBarCodes().forEach(function(result, i, results)
2879
+ * {
2880
+ * console.log ("BarCode CodeText: ".result.getCodeText());
2881
+ * });
2882
+ *
2883
+ * let reader = new BarCodeReader("c:/test.png", DecodeType.CODE_128);
2884
+ *
2885
+ * //StripFNC enabled
2886
+ * reader.getBarcodeSettings().setStripFNC(true);
2887
+ * reader.readBarCodes().forEach(function(result, i, results)
2888
+ * {
2889
+ * console.log ("BarCode CodeText: ".result.getCodeText());
2890
+ * });
2891
+ *
2892
+ * @return Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.
2893
+ */
2894
+ getStripFNC()
2895
+ {
2896
+ return this.getJavaClass().getStripFNCSync();
2897
+ }
2898
+
2899
+ /**
2900
+ * Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.
2901
+ *
2902
+ * Example
2903
+ *
2904
+ * let generator = new BarcodeGenerator(EncodeTypes.GS_1_CODE_128, "(02)04006664241007(37)1(400)7019590754");
2905
+ * generator.save("c:/test.png", BarcodeImageFormat.PNG);
2906
+ * let reader = new BarCodeReader("c:/test.png", DecodeType.CODE_128);
2907
+ *
2908
+ * //StripFNC disabled
2909
+ * reader.getBarcodeSettings().setStripFNC(false);
2910
+ * reader.readBarCodes().forEach(function(result, i, results)
2911
+ * {
2912
+ * console.log ("BarCode CodeText: ".result.getCodeText());
2913
+ * });
2914
+ *
2915
+ * let reader = new BarCodeReader("c:/test.png", DecodeType.CODE_128);
2916
+ *
2917
+ * //StripFNC enabled
2918
+ * reader.getBarcodeSettings().setStripFNC(true);
2919
+ * reader.readBarCodes().forEach(function(result, i, results)
2920
+ * {
2921
+ * console.log ("BarCode CodeText: ".result.getCodeText());
2922
+ * });
2923
+ *
2924
+ * @param value Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.
2925
+ */
2926
+ setStripFNC(value)
2927
+ {
2928
+ this.getJavaClass().setStripFNCSync(value);
2929
+ }
2930
+
2931
+ /**
2932
+ * The flag which force engine to detect codetext encoding for Unicode codesets. Default value is true.
2933
+ *
2934
+ * Example
2935
+ *
2936
+ * let generator = new BarcodeGenerator(EncodeTypes.QR, "Слово"))
2937
+ * $im = generator.generateBarcodeImage(BarcodeImageFormat.PNG);
2938
+ *
2939
+ * //detects encoding for Unicode codesets is enabled
2940
+ * let reader = new BarCodeReader(im, DecodeType.QR);
2941
+ * reader.getBarcodeSettings().setDetectEncoding(true);
2942
+ * reader.readBarCodes().forEach(function(result, i, results)
2943
+ * {
2944
+ * console.log ("BarCode CodeText: ".result.getCodeText());
2945
+ * });
2946
+ * //detect encoding is disabled
2947
+ * let reader = new BarCodeReader(im, DecodeType.QR);
2948
+ * reader.getBarcodeSettings().setDetectEncoding(false);
2949
+ * reader.readBarCodes().forEach(function(result, i, results)
2950
+ * console.log ("BarCode CodeText: " + result.getCodeText());
2951
+ *
2952
+ * @return The flag which force engine to detect codetext encoding for Unicode codesets
2953
+ */
2954
+ getDetectEncoding()
2955
+ {
2956
+ return this.getJavaClass().getDetectEncodingSync();
2957
+ }
2958
+
2959
+ setDetectEncoding(value)
2960
+ {
2961
+ this.getJavaClass().setDetectEncodingSync(value);
2962
+ }
2963
+
2964
+ /**
2965
+ * Gets AustraliaPost decoding parameters
2966
+ * @return The AustraliaPost decoding parameters which make influence on recognized data of AustraliaPost symbology
2967
+ */
2968
+ getAustraliaPost()
2969
+ {
2970
+ return this._australiaPost;
2971
+ }
2972
+ }
2973
+
2974
+ class RecognitionAbortedException extends Error
2975
+ {
2976
+ javaClass;
2977
+
2978
+ static get javaClassName()
2979
+ {
2980
+ return "com.aspose.mw.barcode.recognition.MwRecognitionAbortedException";
2981
+ }
2982
+ /**
2983
+ * Gets the execution time of current recognition session
2984
+ * @return The execution time of current recognition session
2985
+ */
2986
+ getExecutionTime()
2987
+ {
2988
+ return this.javaClass.getExecutionTimeSync();
2989
+ }
2990
+
2991
+ /**
2992
+ * Sets the execution time of current recognition session
2993
+ * @param value The execution time of current recognition session
2994
+ */
2995
+ setExecutionTime(value)
2996
+ {
2997
+ this.javaClass.setExecutionTimeSync(value);
2998
+ }
2999
+
3000
+ /**
3001
+ * Initializes a new instance of the <see cref="RecognitionAbortedException" /> class with specified recognition abort message.
3002
+ * @param message The error message of the exception.
3003
+ * @param executionTime The execution time of current recognition session.
3004
+ */
3005
+ constructor(message, executionTime)
3006
+ {
3007
+ super(message);
3008
+ let java_class_link = new java.import(RecognitionAbortedException.javaClassName);
3009
+ if(message != null && executionTime != null)
3010
+ {
3011
+ this.javaClass = new java_class_link(message, executionTime);
3012
+ }
3013
+ else if (executionTime != null)
3014
+ {
3015
+ this.javaClass = new java_class_link(executionTime);
3016
+ }
3017
+ else
3018
+ this.javaClass = new java_class_link();
3019
+ }
3020
+
3021
+ static construct(javaClass)
3022
+ {
3023
+ let exception = new RecognitionAbortedException(null, null);
3024
+ exception.javaClass = javaClass;
3025
+ return exception;
3026
+ }
3027
+
3028
+ init()
3029
+ {
3030
+
3031
+ }
3032
+ }
3033
+
2585
3034
  /**
2586
3035
  * Specify the type of barcode to read.
2587
3036
  * @example
@@ -3061,17 +3510,58 @@ Code128SubType =
3061
3510
  * @enum
3062
3511
  */
3063
3512
  CustomerInformationInterpretingType =
3064
- {
3513
+ {
3514
+
3065
3515
  /**
3066
3516
  * Use C_TABLE to interpret the customer information. Allows A..Z, a..z, 1..9, space and # sing.
3517
+ *
3518
+ * @code
3519
+ * let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, "5912345678ABCde");
3520
+ * generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.C_TABLE);
3521
+ * let image = generator.generateBarcodeImage(BarcodeImageFormat.PNG);
3522
+ * let reader = new BarCodeReader(image, DecodeType.AUSTRALIA_POST);
3523
+ * reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.C_TABLE);
3524
+ * reader.readBarCodes().forEach(function(result, i, results)
3525
+ * {
3526
+ * print("BarCode Type: " + result.getCodeType());
3527
+ * print("BarCode CodeText: " + result.getCodeText());
3528
+ * });
3529
+ * @endcode
3067
3530
  */
3068
3531
  C_TABLE: 0,
3532
+
3069
3533
  /**
3070
3534
  * Use N_TABLE to interpret the customer information. Allows digits.
3535
+ *
3536
+ * @code
3537
+ * let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, "59123456781234567");
3538
+ * generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.N_TABLE);
3539
+ * let image = generator.generateBarcodeImage(BarcodeImageFormat.PNG);
3540
+ * let reader = new BarCodeReader(image, DecodeType.AUSTRALIA_POST);
3541
+ * reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.N_TABLE);
3542
+ * reader.readBarCodes().forEach(function(result, i, results)
3543
+ * {
3544
+ * print("BarCode Type: " + result.getCodeType());
3545
+ * print("BarCode CodeText: " + result.getCodeText());
3546
+ * });
3547
+ * @endcode
3071
3548
  */
3072
3549
  N_TABLE: 1,
3073
3550
  /**
3074
3551
  * Do not interpret the customer information. Allows 0, 1, 2 or 3 symbol only.
3552
+ *
3553
+ * @code
3554
+ * let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, "59123456780123012301230123");
3555
+ * generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.OTHER);
3556
+ * let image = generator.generateBarcodeImage(BarcodeImageFormat.PNG);
3557
+ * let reader = new BarCodeReader(image, DecodeType.AUSTRALIA_POST);
3558
+ * reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.OTHER));
3559
+ * reader.readBarCodes().forEach(function(result, i, results)
3560
+ * {
3561
+ * print("BarCode Type: " + result.getCodeType());
3562
+ * print("BarCode CodeText: " + result.getCodeText());
3563
+ * });
3564
+ * @endcode
3075
3565
  */
3076
3566
  OTHER: 2,
3077
3567
  };
@@ -3143,6 +3633,8 @@ module.exports = {
3143
3633
  Code128SubType,
3144
3634
  Code128DataPortion,
3145
3635
  DataBarExtendedParameters,
3146
-
3147
- CustomerInformationInterpretingType
3636
+ AustraliaPostSettings,
3637
+ BarcodeSettings,
3638
+ CustomerInformationInterpretingType,
3639
+ RecognitionAbortedException
3148
3640
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aspose.barcode",
3
- "version": "21.8.5",
3
+ "version": "21.11.5",
4
4
  "description": "barcode generation and recognition component",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"