aspose.barcode 24.1.0 → 24.3.0

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.
@@ -43,8 +43,6 @@ class BarCodeReaderExamples
43
43
  let full_path = this.subfolder + file_name;
44
44
  let reader = new BarCodeReader(full_path, null, null);
45
45
  reader.setQualitySettings(QualitySettings.getHighPerformance());
46
- reader.getQualitySettings().setAllowMedianSmoothing(true);
47
- reader.getQualitySettings().setMedianSmoothingWindowSize(5);
48
46
 
49
47
  reader.readBarCodes().forEach(function (result, i, results)
50
48
  {
@@ -4,7 +4,7 @@ const joint_ = require('./Joint');
4
4
  const complexbarcode_ = require("./ComplexBarcode");
5
5
  const generation_ = require("./Generation");
6
6
  const recognition_ = require("./Recognition");
7
- const jar_name_ = "/aspose-barcode-nodejs-24.1.jar";
7
+ const jar_name_ = "/aspose-barcode-nodejs-24.3.jar";
8
8
  const jar_path_ = __dirname + jar_name_;
9
9
  const fs = require("fs");
10
10
 
package/lib/Generation.js CHANGED
@@ -681,6 +681,7 @@ class BaseGenerationParameters extends joint.BaseJavaClass
681
681
  captionBelow;
682
682
  barcodeParameters;
683
683
  borderParameters;
684
+ image;
684
685
 
685
686
  imageWidth;
686
687
  imageHeight;
@@ -699,6 +700,7 @@ class BaseGenerationParameters extends joint.BaseJavaClass
699
700
  this.borderParameters = new BorderParameters(this.getJavaClass().getBorderSync());
700
701
  this.imageWidth = new Unit(this.getJavaClass().getImageWidthSync());
701
702
  this.imageHeight = new Unit(this.getJavaClass().getImageHeightSync());
703
+ this.image = new ImageParameters(this.getJavaClass().getImageSync());
702
704
  }
703
705
 
704
706
  /**
@@ -769,6 +771,15 @@ class BaseGenerationParameters extends joint.BaseJavaClass
769
771
  this.getJavaClass().setResolutionSync(java.newFloat(value));
770
772
  }
771
773
 
774
+ /**
775
+ * Image parameters. See ImageParameters.
776
+ * @return ImageParameters
777
+ */
778
+ getImage()
779
+ {
780
+ return this.image;
781
+ }
782
+
772
783
  /**
773
784
  * BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation.<br>
774
785
  * If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image<br>.
@@ -2544,8 +2555,8 @@ class GS1CompositeBarParameters extends joint.BaseJavaClass
2544
2555
  }
2545
2556
 
2546
2557
  /**
2547
- * Returns a human-readable string representation of this <see cref="DataBarParameters"/>.
2548
- * @return A string that represents this <see cref="DataBarParameters"/>
2558
+ * Returns a human-readable string representation of this DataBarParameters.
2559
+ * @return A string that represents this DataBarParameters
2549
2560
  */
2550
2561
  toString()
2551
2562
  {
@@ -2770,6 +2781,48 @@ class QrParameters extends joint.BaseJavaClass
2770
2781
  this.getJavaClass().setQrVersionSync(value);
2771
2782
  }
2772
2783
 
2784
+ /**
2785
+ * <p>
2786
+ * Version of MicroQR Code. From version M1 to version M4.
2787
+ * Default value is MicroQRVersion.Auto.
2788
+ * </p>
2789
+ */
2790
+ getMicroQRVersion()
2791
+ {
2792
+ return this.getJavaClass().getMicroQRVersionSync();
2793
+ }
2794
+ /**
2795
+ * <p>
2796
+ * Version of MicroQR Code. From version M1 to version M4.
2797
+ * Default value is MicroQRVersion.Auto.
2798
+ * </p>
2799
+ */
2800
+ setMicroQRVersion(value)
2801
+ {
2802
+ this.getJavaClass().setMicroQRVersionSync(value);
2803
+ }
2804
+
2805
+ /**
2806
+ * <p>
2807
+ * Version of RectMicroQR Code. From version R7x59 to version R17x139.
2808
+ * Default value is RectMicroQRVersion.Auto.
2809
+ * </p>
2810
+ */
2811
+ getRectMicroQrVersion()
2812
+ {
2813
+ return this.getJavaClass().getRectMicroQrVersionSync();
2814
+ }
2815
+ /**
2816
+ * <p>
2817
+ * Version of RectMicroQR Code. From version R7x59 to version R17x139.
2818
+ * Default value is RectMicroQRVersion.Auto.
2819
+ * </p>
2820
+ */
2821
+ setRectMicroQrVersion(value)
2822
+ {
2823
+ this.getJavaClass().setRectMicroQrVersionSync(value);
2824
+ }
2825
+
2773
2826
  /**
2774
2827
  * Height/Width ratio of 2D BarCode module.
2775
2828
  */
@@ -5065,52 +5118,93 @@ class HanXinExtCodetextBuilder extends joint.BaseJavaClass
5065
5118
  }
5066
5119
 
5067
5120
  /**
5068
- * Enable checksum validation during recognition for 1D barcodes.<br>
5069
- * Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible.<br>
5070
- * Checksum never used: Codabar<br>
5071
- * Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN<br>
5072
- * Checksum always used: Rest symbologies
5073
- * @example
5074
- * //This sample shows influence of ChecksumValidation on recognition quality and results
5075
- * let generator = new BarcodeGenerator(EncodeTypes.EAN_13, "1234567890128");
5076
- * generator.save("test.png", BarcodeImageFormat.PNG);
5077
- * let reader = new BarCodeReader("test.png", DecodeType.EAN_13);
5078
- * //checksum disabled
5079
- * reader.setChecksumValidation(ChecksumValidation.OFF);
5080
- * reader.readBarCodes().forEach(function(result, i, results)
5081
- * {
5082
- * console.log("BarCode CodeText: " + result.getCodeText());
5083
- * console.log("BarCode Value: " + result.getExtended().getOneD().getValue());
5084
- * console.log("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
5085
- * });
5086
- * let reader = new BarCodeReader("test.png", DecodeType.EAN_13);
5087
- * //checksum enabled
5088
- * reader.setChecksumValidation(ChecksumValidation.ON);
5089
- * reader.readBarCodes().forEach(function(result, i, results)
5090
- * {
5091
- * console.log("BarCode CodeText: " + result.getCodeText());
5092
- * console.log("BarCode Value: " + result.getExtended().getOneD().getValue());
5093
- * console.log("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
5094
- * });
5095
- * @enum
5121
+ * Image parameters.
5096
5122
  */
5097
- ChecksumValidation =
5123
+ class ImageParameters extends joint.BaseJavaClass
5124
+ {
5125
+ svg;
5126
+
5127
+ constructor(javaClass)
5098
5128
  {
5099
- /**
5100
- * If checksum is required by the specification - it will be validated.
5101
- */
5102
- DEFAULT: 0,
5129
+ super(javaClass);
5130
+ this.init();
5131
+ }
5103
5132
 
5104
- /**
5105
- * Always validate checksum if possible.
5106
- */
5107
- ON: 1,
5133
+ init()
5134
+ {
5135
+ this.svg = new SvgParameters(this.getJavaClass().getSvgSync());
5136
+ }
5137
+
5138
+ /**
5139
+ * SVG parameters
5140
+ */
5141
+ getSvg()
5142
+ {
5143
+ return this.svg;
5144
+ }
5145
+
5146
+ /**
5147
+ * SVG parameters
5148
+ */
5149
+ setSvg(svg)
5150
+ {
5151
+ this.svg = svg;
5152
+ this.getJavaClass().setSvgSync(svg.getJavaClass());
5153
+ }
5154
+ }
5108
5155
 
5109
- /**
5110
- * Do not validate checksum.
5111
- */
5112
- OFF: 2
5113
- };
5156
+
5157
+ /**
5158
+ * SVG parameters.
5159
+ */
5160
+ class SvgParameters extends joint.BaseJavaClass
5161
+ {
5162
+ constructor(javaClass)
5163
+ {
5164
+ super(javaClass);
5165
+ this.init();
5166
+ }
5167
+
5168
+ init()
5169
+ {
5170
+ }
5171
+
5172
+ /**
5173
+ * Does SVG image contain explicit size in pixels (recommended)
5174
+ * Default value: true.
5175
+ */
5176
+ isExplicitSizeInPixels()
5177
+ {
5178
+ return this.getJavaClass().isExplicitSizeInPixelsSync();
5179
+ }
5180
+
5181
+ /**
5182
+ * Does SVG image contain explicit size in pixels (recommended)
5183
+ * Default value: true.
5184
+ */
5185
+ setExplicitSizeInPixels(explicitSizeInPixels)
5186
+ {
5187
+ this.getJavaClass().setExplicitSizeInPixelsSync(explicitSizeInPixels);
5188
+ }
5189
+
5190
+ /**
5191
+ * Does SVG image contain text as text element rather than paths (recommended)
5192
+ * Default value: true.
5193
+ */
5194
+ isTextDrawnInTextElement()
5195
+ {
5196
+ return this.getJavaClass().isTextDrawnInTextElementSync();
5197
+ }
5198
+
5199
+ /**
5200
+ * Does SVG image contain text as text element rather than paths (recommended)
5201
+ * Default value: true.
5202
+ */
5203
+ setTextDrawnInTextElement(textDrawnInTextElement)
5204
+ {
5205
+ this.getJavaClass().setTextDrawnInTextElementSync(textDrawnInTextElement);
5206
+ }
5207
+ }
5114
5208
 
5115
5209
  /**
5116
5210
  * BarcodeClassifications EncodeTypes classification
@@ -6466,6 +6560,16 @@ EncodeTypes =
6466
6560
  */
6467
6561
  GS_1_HAN_XIN: 80,
6468
6562
 
6563
+ /**
6564
+ * Specifies that the data should be encoded with <b>MicroQR Code</b> barcode specification
6565
+ */
6566
+ MICRO_QR: 83,
6567
+
6568
+ /**
6569
+ * Specifies that the data should be encoded with <b>RectMicroQR (rMQR) Code</b> barcode specification
6570
+ */
6571
+ RECT_MICRO_QR: 84,
6572
+
6469
6573
  parse(encodeTypeName)
6470
6574
  {
6471
6575
  if(encodeTypeName == "CODABAR") return 0;
@@ -6632,6 +6736,10 @@ EncodeTypes =
6632
6736
 
6633
6737
  else if(encodeTypeName == "GS_1_HAN_XIN") return 80;
6634
6738
 
6739
+ else if(encodeTypeName == "MICRO_QR") return 83;
6740
+
6741
+ else if(encodeTypeName == "RECT_MICRO_QR") return 84;
6742
+
6635
6743
  else return -1;
6636
6744
  }
6637
6745
  }
@@ -8558,13 +8666,300 @@ AztecEncodeMode =
8558
8666
  EXTENDED_CODETEXT: 2
8559
8667
  }
8560
8668
 
8669
+ /**
8670
+ * <p>
8671
+ * Version of MicroQR Code.
8672
+ * From M1 to M4.
8673
+ * </p>
8674
+ * @enum
8675
+ */
8676
+ MicroQRVersion =
8677
+ {
8678
+ /**
8679
+ * <p>
8680
+ * Specifies to automatically pick up the best version for MicroQR.
8681
+ * This is default value.
8682
+ * </p>
8683
+ */
8684
+ AUTO: 0,
8685
+
8686
+ /**
8687
+ * <p>
8688
+ * Specifies version M1 for Micro QR with 11 x 11 modules.
8689
+ * </p>
8690
+ */
8691
+ M1: 1,
8692
+
8693
+ /**
8694
+ * <p>
8695
+ * Specifies version M2 for Micro QR with 13 x 13 modules.
8696
+ * </p>
8697
+ */
8698
+ M2: 2,
8699
+
8700
+ /**
8701
+ * <p>
8702
+ * Specifies version M3 for Micro QR with 15 x 15 modules.
8703
+ * </p>
8704
+ */
8705
+ M3: 3,
8706
+
8707
+ /**
8708
+ * <p>
8709
+ * Specifies version M4 for Micro QR with 17 x 17 modules.
8710
+ * </p>
8711
+ */
8712
+ M4: 4
8713
+ }
8714
+
8715
+ /**
8716
+ * <p>
8717
+ * Version of RectMicroQR Code.
8718
+ * From version R7x43 to version R17x139.
8719
+ * </p>
8720
+ * @enum
8721
+ */
8722
+ RectMicroQRVersion =
8723
+ {
8724
+ /**
8725
+ * <p>
8726
+ * Specifies to automatically pick up the best version for RectMicroQR.
8727
+ * This is default value.
8728
+ * </p>
8729
+ */
8730
+ AUTO: 0,
8731
+
8732
+ /**
8733
+ * <p>
8734
+ * Specifies version with 7 x 43 modules.
8735
+ * </p>
8736
+ */
8737
+ R7x43: 1,
8738
+
8739
+ /**
8740
+ * <p>
8741
+ * Specifies version with 7 x 59 modules.
8742
+ * </p>
8743
+ */
8744
+ R7x59: 2,
8745
+
8746
+ /**
8747
+ * <p>
8748
+ * Specifies version with 7 x 77 modules.
8749
+ * </p>
8750
+ */
8751
+ R7x77: 3,
8752
+
8753
+ /**
8754
+ * <p>
8755
+ * Specifies version with 7 x 99 modules.
8756
+ * </p>
8757
+ */
8758
+ R7x99: 4,
8759
+
8760
+ /**
8761
+ * <p>
8762
+ * Specifies version with 7 x 139 modules.
8763
+ * </p>
8764
+ */
8765
+ R7x139: 5,
8766
+
8767
+ /**
8768
+ * <p>
8769
+ * Specifies version with 9 x 43 modules.
8770
+ * </p>
8771
+ */
8772
+ R9x43: 6,
8773
+
8774
+ /**
8775
+ * <p>
8776
+ * Specifies version with 9 x 59 modules.
8777
+ * </p>
8778
+ */
8779
+ R9x59: 7,
8780
+
8781
+ /**
8782
+ * <p>
8783
+ * Specifies version with 9 x 77 modules.
8784
+ * </p>
8785
+ */
8786
+ R9x77: 8,
8787
+
8788
+ /**
8789
+ * <p>
8790
+ * Specifies version with 9 x 99 modules.
8791
+ * </p>
8792
+ */
8793
+ R9x99: 9,
8794
+
8795
+ /**
8796
+ * <p>
8797
+ * Specifies version with 9 x 139 modules.
8798
+ * </p>
8799
+ */
8800
+ R9x139: 10,
8801
+
8802
+ /**
8803
+ * <p>
8804
+ * Specifies version with 11 x 27 modules.
8805
+ * </p>
8806
+ */
8807
+ R11x27: 11,
8808
+
8809
+ /**
8810
+ * <p>
8811
+ * Specifies version with 11 x 43 modules.
8812
+ * </p>
8813
+ */
8814
+ R11x43: 12,
8815
+
8816
+ /**
8817
+ * <p>
8818
+ * Specifies version with 11 x 59 modules.
8819
+ * </p>
8820
+ */
8821
+ R11x59: 13,
8822
+
8823
+ /**
8824
+ * <p>
8825
+ * Specifies version with 11 x 77 modules.
8826
+ * </p>
8827
+ */
8828
+ R11x77: 14,
8829
+
8830
+ /**
8831
+ * <p>
8832
+ * Specifies version with 11 x 99 modules.
8833
+ * </p>
8834
+ */
8835
+ R11x99: 15,
8836
+
8837
+ /**
8838
+ * <p>
8839
+ * Specifies version with 11 x 139 modules.
8840
+ * </p>
8841
+ */
8842
+ R11x139: 16,
8843
+
8844
+ /**
8845
+ * <p>
8846
+ * Specifies version with 13 x 27 modules.
8847
+ * </p>
8848
+ */
8849
+ R13x27: 17,
8850
+
8851
+ /**
8852
+ * <p>
8853
+ * Specifies version with 13 x 43 modules.
8854
+ * </p>
8855
+ */
8856
+ R13x43: 18,
8857
+
8858
+ /**
8859
+ * <p>
8860
+ * Specifies version with 13 x 59 modules.
8861
+ * </p>
8862
+ */
8863
+ R13x59: 19,
8864
+
8865
+ /**
8866
+ * <p>
8867
+ * Specifies version with 13 x 77 modules.
8868
+ * </p>
8869
+ */
8870
+ R13x77: 20,
8871
+
8872
+ /**
8873
+ * <p>
8874
+ * Specifies version with 13 x 99 modules.
8875
+ * </p>
8876
+ */
8877
+ R13x99: 21,
8878
+
8879
+ /**
8880
+ * <p>
8881
+ * Specifies version with 13 x 139 modules.
8882
+ * </p>
8883
+ */
8884
+ R13x139: 22,
8885
+
8886
+ /**
8887
+ * <p>
8888
+ * Specifies version with 15 x 43 modules.
8889
+ * </p>
8890
+ */
8891
+ R15x43: 23,
8892
+
8893
+ /**
8894
+ * <p>
8895
+ * Specifies version with 15 x 59 modules.
8896
+ * </p>
8897
+ */
8898
+ R15x59: 24,
8899
+
8900
+ /**
8901
+ * <p>
8902
+ * Specifies version with 15 x 77 modules.
8903
+ * </p>
8904
+ */
8905
+ R15x77: 25,
8906
+
8907
+ /**
8908
+ * <p>
8909
+ * Specifies version with 15 x 99 modules.
8910
+ * </p>
8911
+ */
8912
+ R15x99: 26,
8913
+
8914
+ /**
8915
+ * <p>
8916
+ * Specifies version with 15 x 139 modules.
8917
+ * </p>
8918
+ */
8919
+ R15x139: 27,
8920
+
8921
+ /**
8922
+ * <p>
8923
+ * Specifies version with 17 x 43 modules.
8924
+ * </p>
8925
+ */
8926
+ R17x43: 28,
8927
+
8928
+ /**
8929
+ * <p>
8930
+ * Specifies version with 17 x 59 modules.
8931
+ * </p>
8932
+ */
8933
+ R17x59: 29,
8934
+
8935
+ /**
8936
+ * <p>
8937
+ * Specifies version with 17 x 77 modules.
8938
+ * </p>
8939
+ */
8940
+ R17x77: 30,
8941
+
8942
+ /**
8943
+ * <p>
8944
+ * Specifies version with 17 x 99 modules.
8945
+ * </p>
8946
+ */
8947
+ R17x99: 31,
8948
+
8949
+ /**
8950
+ * <p>
8951
+ * Specifies version with 17 x 139 modules.
8952
+ * </p>
8953
+ */
8954
+ R17x139: 32
8955
+ }
8956
+
8561
8957
  module.exports = {
8562
8958
  BarcodeGenerator,
8563
8959
  EncodeTypes,
8564
8960
  BarcodeParameters,
8565
8961
  BaseGenerationParameters,
8566
8962
  BorderParameters,
8567
- ChecksumValidation,
8568
8963
  CaptionParameters,
8569
8964
  BorderDashStyle,
8570
8965
  AutoSizeMode,
@@ -8630,5 +9025,9 @@ module.exports = {
8630
9025
  DataMatrixExtCodetextBuilder,
8631
9026
  HanXinExtCodetextBuilder,
8632
9027
  AztecEncodeMode,
8633
- AztecExtCodetextBuilder
9028
+ AztecExtCodetextBuilder,
9029
+ MicroQRVersion,
9030
+ RectMicroQRVersion,
9031
+ ImageParameters,
9032
+ SvgParameters
8634
9033
  };