aspose.barcode 22.9.0 → 22.11.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.
package/lib/Generation.js CHANGED
@@ -738,7 +738,7 @@ class BaseGenerationParameters extends joint.BaseJavaClass
738
738
  * //This sample shows how to create and save a BarCode image.
739
739
  * let generator = new BarcodeGenerator( EncodeTypes.DATA_MATRIX);
740
740
  * generator.getParameters().setRotationAngle(7);
741
- * generator.save("test.png");
741
+ * generator.save("test.png", BarcodeImageFormat.PNG);
742
742
  */
743
743
  getRotationAngle()
744
744
  {
@@ -753,7 +753,7 @@ class BaseGenerationParameters extends joint.BaseJavaClass
753
753
  * //This sample shows how to create and save a BarCode image.
754
754
  * let generator = new BarcodeGenerator( EncodeTypes.DATA_MATRIX);
755
755
  * generator.getParameters().setRotationAngle(7);
756
- * generator.save("test.png");
756
+ * generator.save("test.png", BarcodeImageFormat.PNG);
757
757
  */
758
758
  setRotationAngle(value)
759
759
  {
@@ -994,7 +994,7 @@ class BorderParameters extends joint.BaseJavaClass
994
994
  * @example
995
995
  * //This sample shows influence of ChecksumValidation on recognition quality and results
996
996
  * let generator = new BarcodeGenerator(EncodeTypes.EAN_13, "1234567890128");
997
- * generator.save("test.png");
997
+ * generator.save("test.png", BarcodeImageFormat.PNG);
998
998
  * let reader = new BarCodeReader("test.png", DecodeType.EAN_13);
999
999
  * //checksum disabled
1000
1000
  * reader.setChecksumValidation(ChecksumValidation.OFF);
@@ -1188,7 +1188,7 @@ class CaptionParameters extends joint.BaseJavaClass
1188
1188
  * //This sample shows how to create and save a BarCode image.
1189
1189
  * let generator = new BarcodeGenerator(EncodeTypes.CODE_128);
1190
1190
  * generator.getParameters().getBarcode().getBarHeight().setMillimeters(10);
1191
- * generator.save("test.png");
1191
+ * generator.save("test.png", BarcodeImageFormat.PNG);
1192
1192
  */
1193
1193
  class Unit extends joint.BaseJavaClass
1194
1194
  {
@@ -1571,7 +1571,7 @@ class CodetextParameters extends joint.BaseJavaClass
1571
1571
 
1572
1572
  /**
1573
1573
  * Specify the displaying CodeText Location, set to CodeLocation.NONE to hide CodeText.<br>
1574
- * Default value: CodeLocation.BELOW.
1574
+ * Default value: CodeLocation.NONE.
1575
1575
  */
1576
1576
  setLocation(value)
1577
1577
  {
@@ -2888,6 +2888,24 @@ class Pdf417Parameters extends joint.BaseJavaClass
2888
2888
  this.getJavaClass().setPdf417MacroECIEncodingSync(value);
2889
2889
  }
2890
2890
 
2891
+ /**
2892
+ * Used to tell the encoder whether to add Macro PDF417 Terminator (codeword 922) to the segment.
2893
+ * Applied only for Macro PDF417.
2894
+ */
2895
+ getPdf417MacroTerminator()
2896
+ {
2897
+ return this.getJavaClass().getPdf417MacroTerminatorSync();
2898
+ }
2899
+
2900
+ /**
2901
+ * Used to tell the encoder whether to add Macro PDF417 Terminator (codeword 922) to the segment.
2902
+ * Applied only for Macro PDF417.
2903
+ */
2904
+ setPdf417MacroTerminator(value)
2905
+ {
2906
+ this.getJavaClass().setPdf417MacroTerminatorSync(value);
2907
+ }
2908
+
2891
2909
  /**
2892
2910
  * Used to instruct the reader to interpret the data contained within the symbol<br>
2893
2911
  * as programming for reader initialization<br>
@@ -3005,6 +3023,22 @@ class MaxiCodeParameters extends joint.BaseJavaClass
3005
3023
  {
3006
3024
  }
3007
3025
 
3026
+ /**
3027
+ * Gets a MaxiCode encode mode.
3028
+ */
3029
+ getMaxiCodeMode()
3030
+ {
3031
+ return this.getJavaClass().getMaxiCodeModeSync();
3032
+ }
3033
+
3034
+ /**
3035
+ * Sets a MaxiCode encode mode.
3036
+ */
3037
+ setMaxiCodeMode(maxiCodeMode)
3038
+ {
3039
+ this.getJavaClass().setMaxiCodeModeSync(maxiCodeMode);
3040
+ }
3041
+
3008
3042
  /**
3009
3043
  * Gets a MaxiCode encode mode.
3010
3044
  */
@@ -3021,6 +3055,64 @@ class MaxiCodeParameters extends joint.BaseJavaClass
3021
3055
  this.getJavaClass().setMaxiCodeEncodeModeSync(value);
3022
3056
  }
3023
3057
 
3058
+ /**
3059
+ * Gets ECI encoding. Used when MaxiCodeEncodeMode is AUTO.
3060
+ * Default value: ISO-8859-1
3061
+ */
3062
+ getECIEncoding()
3063
+ {
3064
+ return this.getJavaClass().getECIEncodingSync();
3065
+ }
3066
+
3067
+ /**
3068
+ * Sets ECI encoding. Used when MaxiCodeEncodeMode is AUTO.
3069
+ * Default value: ISO-8859-1
3070
+ */
3071
+ setECIEncoding(ECIEncoding)
3072
+ {
3073
+ this.getJavaClass().setECIEncodingSync(ECIEncoding);
3074
+ }
3075
+
3076
+ /**
3077
+ * Gets a MaxiCode barcode id in structured append mode.
3078
+ * ID must be a value between 1 and 8.
3079
+ * Default value: 0
3080
+ */
3081
+ getMaxiCodeStructuredAppendModeBarcodeId()
3082
+ {
3083
+ return this.getJavaClass().getMaxiCodeStructuredAppendModeBarcodeIdSync();
3084
+ }
3085
+
3086
+ /**
3087
+ * Sets a MaxiCode barcode id in structured append mode.
3088
+ * ID must be a value between 1 and 8.
3089
+ * Default value: 0
3090
+ */
3091
+ setMaxiCodeStructuredAppendModeBarcodeId(maxiCodeStructuredAppendModeBarcodeId)
3092
+ {
3093
+ this.getJavaClass().setMaxiCodeStructuredAppendModeBarcodeIdSync(maxiCodeStructuredAppendModeBarcodeId);
3094
+ }
3095
+
3096
+ /**
3097
+ * Gets a MaxiCode barcodes count in structured append mode.
3098
+ * Count number must be a value between 2 and 8 (maximum barcodes count).
3099
+ * Default value: -1
3100
+ */
3101
+ getMaxiCodeStructuredAppendModeBarcodesCount()
3102
+ {
3103
+ return this.getJavaClass().getMaxiCodeStructuredAppendModeBarcodesCountSync();
3104
+ }
3105
+
3106
+ /**
3107
+ * Sets a MaxiCode barcodes count in structured append mode.
3108
+ * Count number must be a value between 2 and 8 (maximum barcodes count).
3109
+ * Default value: -1
3110
+ */
3111
+ setMaxiCodeStructuredAppendModeBarcodesCount(maxiCodeStructuredAppendModeBarcodesCount)
3112
+ {
3113
+ this.getJavaClass().setMaxiCodeStructuredAppendModeBarcodesCountSync(maxiCodeStructuredAppendModeBarcodesCount);
3114
+ }
3115
+
3024
3116
  /**
3025
3117
  * Height/Width ratio of 2D BarCode module.
3026
3118
  */
@@ -3366,7 +3458,6 @@ class FontUnit extends joint.BaseJavaClass
3366
3458
  */
3367
3459
  class ExtCodetextBuilder extends joint.BaseJavaClass
3368
3460
  {
3369
-
3370
3461
  constructor(javaClass)
3371
3462
  {
3372
3463
  super(javaClass);
@@ -3467,7 +3558,8 @@ class QrExtCodetextBuilder extends ExtCodetextBuilder
3467
3558
 
3468
3559
  constructor()
3469
3560
  {
3470
- super(new java.import(QrExtCodetextBuilder.javaClassName)());
3561
+ let java_class = java.import(QrExtCodetextBuilder.javaClassName);
3562
+ super(new java_class());
3471
3563
  this.init();
3472
3564
  }
3473
3565
 
@@ -3587,6 +3679,60 @@ class QrStructuredAppendParameters extends joint.BaseJavaClass
3587
3679
  }
3588
3680
  }
3589
3681
 
3682
+ /**
3683
+ * Extended codetext generator for MaxiCode barcodes for ExtendedCodetext Mode of MaxiCodeEncodeMode
3684
+ * Use TwoDDisplayText property of BarcodeGenerator to set visible text to removing managing characters.
3685
+ *
3686
+ * This sample shows how to use MaxiCodeExtCodetextBuilder in Extended Mode.
3687
+ *
3688
+ * <pre>
3689
+ * //create codetext
3690
+ * let textBuilder = new MaxiCodeExtCodetextBuilder();
3691
+ * textBuilder.addECICodetext(ECIEncodings.Win1251, "Will");
3692
+ * textBuilder.addECICodetext(ECIEncodings.UTF8, "犬Right狗");
3693
+ * textBuilder.addECICodetext(ECIEncodings.UTF16BE, "犬Power狗");
3694
+ * textBuilder.addPlainCodetext("Plain text");
3695
+ *
3696
+ * //generate codetext
3697
+ * let codetext = textBuilder.getExtendedCodetext();
3698
+ *
3699
+ * //generate
3700
+ * let generator = new BarcodeGenerator(EncodeTypes.MAXI_CODE, codetext);
3701
+ * generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text");
3702
+ * generator.save("test.bmp", BarcodeImageFormat.BMP);
3703
+ * </pre>
3704
+ */
3705
+ class MaxiCodeExtCodetextBuilder extends ExtCodetextBuilder
3706
+ {
3707
+ static JAVA_CLASS_NAME = "com.aspose.mw.barcode.generation.MwMaxiCodeExtCodetextBuilder";
3708
+
3709
+ constructor()
3710
+ {
3711
+ try
3712
+ {
3713
+ let java_class = java.import(MaxiCodeExtCodetextBuilder.JAVA_CLASS_NAME);
3714
+ super(new java_class());
3715
+ }
3716
+ catch (ex)
3717
+ {
3718
+ throw new BarcodeException(ex.getMessage(), __FILE__, __LINE__);
3719
+ }
3720
+ }
3721
+
3722
+ init()
3723
+ {
3724
+ }
3725
+
3726
+ /**
3727
+ * Generates Extended codetext from the extended codetext list.
3728
+ * @return Extended codetext as string
3729
+ */
3730
+ getExtendedCodetext()
3731
+ {
3732
+ return this.getJavaClass().getExtendedCodetextSync();
3733
+ }
3734
+ }
3735
+
3590
3736
  /**
3591
3737
  * BarcodeClassifications EncodeTypes classification
3592
3738
  * @enum
@@ -3720,7 +3866,7 @@ DataMatrixEncodeMode =
3720
3866
  * $generator->setCodeText("\\ansix12:ANSIX12TEXT\\ascii:backslash must be \\\\ doubled\\edifact:EdifactEncodedText");
3721
3867
  * $generator->getParameters()->getBarcode()->getDataMatrix().setDataMatrixEncodeMode(DataMatrixEncodeMode.EXTENDED_CODETEXT);
3722
3868
  * $generator->getParameters()->getBarcode()->getCodeTextParameters().setTwoDDisplayText("My Text");
3723
- * $generator->save("test.png");
3869
+ * $generator->save("test.png", BarcodeImageFormat.PNG);
3724
3870
  */
3725
3871
  EXTENDED_CODETEXT: 12
3726
3872
  };
@@ -3786,12 +3932,12 @@ ITF14BorderType =
3786
3932
  * Encoding mode for QR barcodes. It is recommended to Use AUTO with CodeTextEncoding = Encoding.UTF8 for latin symbols or digits and UTF_8_BOM for unicode symbols.
3787
3933
  * @example
3788
3934
  * //Example how to use ECI encoding
3789
- * BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR);
3935
+ * let generator = new BarcodeGenerator(EncodeTypes.QR);
3790
3936
  * generator.setCodeText("12345TEXT");
3791
3937
  * generator.getParameters().getBarcode().getQR().setQrEncodeMode(QREncodeMode.ECI_ENCODING);
3792
3938
  * generator.getParameters().getBarcode().getQR().setQrEncodeType(QREncodeType.FORCE_QR);
3793
3939
  * generator.getParameters().getBarcode().getQR().setQrECIEncoding(ECIEncodings.UTF8);
3794
- * generator.save("test.png");
3940
+ * generator.save("test.png", BarcodeImageFormat.PNG);
3795
3941
  *
3796
3942
  * @example
3797
3943
  * //Example how to use FNC1 first position in Extended Mode
@@ -3800,11 +3946,11 @@ ITF14BorderType =
3800
3946
  * textBuilder.addFNC1GroupSeparator();
3801
3947
  * textBuilder.addPlainCodetext("12345&lt;FNC1&gt;");
3802
3948
  * //generate barcode
3803
- * BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR);
3949
+ * let generator = new BarcodeGenerator(EncodeTypes.QR);
3804
3950
  * generator.setCodeText(textBuilder.getExtendedCodetext());
3805
3951
  * generator.getParameters().getBarcode().getQR().setQrEncodeMode(QREncodeMode.EXTENDED_CODETEXT);
3806
3952
  * generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text");
3807
- * generator.save("d:/test.png");
3953
+ * generator.save("d:/test.png", BarcodeImageFormat.PNG);
3808
3954
  *
3809
3955
  * @example
3810
3956
  * // This sample shows how to use FNC1 second position in Extended Mode.
@@ -3813,10 +3959,10 @@ ITF14BorderType =
3813
3959
  * textBuilder.addFNC1SecondPosition("12");
3814
3960
  * textBuilder.addPlainCodetext("TRUE3456");
3815
3961
  * //generate barcode
3816
- * BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR);
3962
+ * let generator = new BarcodeGenerator(EncodeTypes.QR);
3817
3963
  * generator.setCodeText(textBuilder.getExtendedCodetext());
3818
3964
  * generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text");
3819
- * generator.save("d:/test.png");
3965
+ * generator.save("d:/test.png", BarcodeImageFormat.PNG);
3820
3966
  *
3821
3967
  * @example
3822
3968
  * //This sample shows how to use multi ECI mode in Extended Mode.
@@ -3827,11 +3973,11 @@ ITF14BorderType =
3827
3973
  * textBuilder.addECICodetext(ECIEncodings.UTF16BE, "Power");
3828
3974
  * textBuilder.addPlainCodetext("t\e\\st");
3829
3975
  * //generate barcode
3830
- * BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR);
3976
+ * let generator = new BarcodeGenerator(EncodeTypes.QR);
3831
3977
  * generator.setCodeText(textBuilder.getExtendedCodetext());
3832
3978
  * generator.getParameters().getBarcode().getQR().setQrEncodeMode(QREncodeMode.EXTENDED_CODETEXT);
3833
3979
  * generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text");
3834
- * generator.save("d:/test.png");
3980
+ * generator.save("d:/test.png", BarcodeImageFormat.PNG);
3835
3981
  * @enum
3836
3982
  */
3837
3983
  QREncodeMode =
@@ -4393,7 +4539,7 @@ TextAlignment =
4393
4539
  * generator.setAutoSizeMode(AutoSizeMode.NEAREST);
4394
4540
  * generator.getBarCodeWidth().setMillimeters(50);
4395
4541
  * generator.getBarCodeHeight().setInches(1.3f);
4396
- * generator.save("test.png");
4542
+ * generator.save("test.png", BarcodeImageFormat.PNG);
4397
4543
  *
4398
4544
  * @enum
4399
4545
  */
@@ -4421,7 +4567,7 @@ AutoSizeMode =
4421
4567
  * generator.getParameters().getBarcode().setAutoSizeMode(AutoSizeMode.INTERPOLATION);
4422
4568
  * generator.getParameters().getBarcode().getBarCodeWidth().setMillimeters(50);
4423
4569
  * generator.getParameters().getBarcode().getBarCodeHeight().setInches(1.3);
4424
- * generator.save("test.png");
4570
+ * generator.save("test.png", BarcodeImageFormat.PNG);
4425
4571
  */
4426
4572
  INTERPOLATION: 2,
4427
4573
  };
@@ -4850,7 +4996,7 @@ MacroCharacter =
4850
4996
  * //to generate autoidentified GS1 message like this "(10)123ABC(10)123ABC" in ISO 15434 format you need:
4851
4997
  * let generator = new BarcodeGenerator(EncodeTypes.DATA_MATRIX, "10123ABC\u001D10123ABC");
4852
4998
  * generator.getParameters().getBarcode().getDataMatrix().setMacroCharacters(MacroCharacter.MACRO_05);
4853
- * let reader = new BarCodeReader(generator.generateBarCodeImage(), DecodeType.GS_1_DATA_MATRIX);
4999
+ * let reader = new BarCodeReader(generator.generateBarCodeImage(BarcodeImageFormat.PNG), DecodeType.GS_1_DATA_MATRIX);
4854
5000
  * reader.readBarCodes().forEach(function(result, i, results)
4855
5001
  * {
4856
5002
  * cosole.log("BarCode CodeText: " + result.getCodeText());
@@ -5164,6 +5310,205 @@ TwoDComponentType =
5164
5310
  CC_C: 3
5165
5311
  }
5166
5312
 
5313
+ /**
5314
+ * Used to tell the encoder whether to add Macro PDF417 Terminator (codeword 922) to the segment.
5315
+ * Applied only for Macro PDF417.
5316
+ */
5317
+ Pdf417MacroTerminator =
5318
+ {
5319
+ /**
5320
+ * The terminator will be added automatically if the number of segments is provided
5321
+ * and the current segment is the last one. In other cases, the terminator will not be added.
5322
+ */
5323
+ AUTO: 0,
5324
+
5325
+ /**
5326
+ * The terminator will not be added.
5327
+ */
5328
+ NONE: 1,
5329
+
5330
+ /**
5331
+ * The terminator will be added.
5332
+ */
5333
+ SET: 2
5334
+ }
5335
+
5336
+
5337
+ /**
5338
+ * Encoding mode for MaxiCode barcodes.
5339
+ *
5340
+ * @example
5341
+ * //Auto mode
5342
+ * let codetext = "犬Right狗";
5343
+ * let generator = new BarcodeGenerator(EncodeTypes.MAXI_CODE, codetext));
5344
+ * {
5345
+ * generator.getParameters().getBarcode().getMaxiCode().setECIEncoding(ECIEncodings.UTF8);
5346
+ * generator.save("test.bmp", BarcodeImageFormat.BMP);
5347
+ * }
5348
+ *
5349
+ * //Bytes mode
5350
+ * let encodedArr = [ 0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9 ];
5351
+ *
5352
+ * //encode array to string
5353
+ * let strBld = "";
5354
+ * encodedArr.forEach(function(bval, i, bvals)
5355
+ * {
5356
+ * strBld += bval;
5357
+ * });
5358
+ * let codetext = strBld;
5359
+ *
5360
+ * let generator1 = new BarcodeGenerator(EncodeTypes.MAXI_CODE, codetext))
5361
+ * generator.getParameters().getBarcode().getMaxiCode().setMaxiCodeEncodeMode(MaxiCodeEncodeMode.BYTES);
5362
+ * generator.save("test.bmp", BarcodeImageFormat.BMP);
5363
+ *
5364
+ * //Extended codetext mode
5365
+ * //create codetext
5366
+ * let textBuilder = new MaxiCodeExtCodetextBuilder();
5367
+ * textBuilder.addECICodetext(ECIEncodings.Win1251, "Will");
5368
+ * textBuilder.addECICodetext(ECIEncodings.UTF8, "犬Right狗");
5369
+ * textBuilder.addECICodetext(ECIEncodings.UTF16BE, "犬Power狗");
5370
+ * textBuilder.addPlainCodetext("Plain text");
5371
+ *
5372
+ * // generate codetext
5373
+ * let codetext = textBuilder.getExtendedCodetext();
5374
+ *
5375
+ * //generate
5376
+ * let generator = new BarcodeGenerator(EncodeTypes.MaxiCode, codetext);
5377
+ * generator.getParameters().getBarcode().getMaxiCode().setMaxiCodeEncodeMode(MaxiCodeEncodeMode.EXTENDED_CODETEXT);
5378
+ * generator.getParameters().getBarcode().getMaxiCode().setTwoDDisplayText("My Text");
5379
+ * generator.save("test.bmp", BarcodeImageFormat.BMP);
5380
+ */
5381
+ MaxiCodeEncodeMode =
5382
+ {
5383
+
5384
+ /**
5385
+ * Encode codetext with value set in the ECIEncoding property.
5386
+ */
5387
+ AUTO: 0,
5388
+
5389
+ /**
5390
+ * Encode codetext as plain bytes. If it detects any Unicode character, the character will be encoded as two bytes, lower byte first.
5391
+ */
5392
+ BYTES: 1,
5393
+
5394
+ /**
5395
+ * Extended mode which supports multi ECI modes.
5396
+ * It is better to use MaxiCodeExtCodetextBuilder for extended codetext generation.
5397
+ * Use Display2DText property to set visible text to removing managing characters.
5398
+ * ECI identifiers are set as single slash and six digits identifier "\000026" - UTF8 ECI identifier
5399
+ * All unicode characters after ECI identifier are automatically encoded into correct character codeset.
5400
+ */
5401
+ EXTENDED_CODETEXT: 2
5402
+ }
5403
+
5404
+ /**
5405
+ * Encoding mode for MaxiCode barcodes.
5406
+ *
5407
+ * This sample shows how to genereate MaxiCode barcodes using ComplexBarcodeGenerator
5408
+ * @example
5409
+ * //Mode 2 with standart second message
5410
+ * let maxiCodeCodetext = new MaxiCodeCodetextMode2();
5411
+ * maxiCodeCodetext.setPostalCode("524032140");
5412
+ * maxiCodeCodetext.setCountryCode(056);
5413
+ * maxiCodeCodetext.setServiceCategory(999);
5414
+ * let maxiCodeStandartSecondMessage = new MaxiCodeStandartSecondMessage();
5415
+ * maxiCodeStandartSecondMessage.setMessage("Test message");
5416
+ * maxiCodeCodetext.setSecondMessage(maxiCodeStandartSecondMessage);
5417
+ * let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext);
5418
+ * complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
5419
+ *
5420
+ * //Mode 2 with structured second message
5421
+ * let maxiCodeCodetext = new MaxiCodeCodetextMode2();
5422
+ * maxiCodeCodetext.setPostalCode("524032140");
5423
+ * maxiCodeCodetext.setCountryCode(056);
5424
+ * maxiCodeCodetext.setServiceCategory(999);
5425
+ * let maxiCodeStructuredSecondMessage = new MaxiCodeStructuredSecondMessage();
5426
+ * maxiCodeStructuredSecondMessage.add("634 ALPHA DRIVE");
5427
+ * maxiCodeStructuredSecondMessage.add("PITTSBURGH");
5428
+ * maxiCodeStructuredSecondMessage.add("PA");
5429
+ * maxiCodeStructuredSecondMessage.setYear(99);
5430
+ * maxiCodeCodetext.setSecondMessage(maxiCodeStructuredSecondMessage);
5431
+ * let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext);
5432
+ * complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
5433
+ *
5434
+ * //Mode 3 with standart second message
5435
+ * let maxiCodeCodetext = new MaxiCodeCodetextMode3();
5436
+ * maxiCodeCodetext.setPostalCode("B1050");
5437
+ * maxiCodeCodetext.setCountryCode(056);
5438
+ * maxiCodeCodetext.setServiceCategory(999);
5439
+ * let maxiCodeStandartSecondMessage = new MaxiCodeStandartSecondMessage();
5440
+ * maxiCodeStandartSecondMessage.setMessage("Test message");
5441
+ * maxiCodeCodetext.setSecondMessage(maxiCodeStandartSecondMessage);
5442
+ * let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext);
5443
+ * complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
5444
+ *
5445
+ * //Mode 3 with structured second message
5446
+ * let maxiCodeCodetext = new MaxiCodeCodetextMode3();
5447
+ * maxiCodeCodetext.setPostalCode("B1050");
5448
+ * maxiCodeCodetext.setCountryCode(056);
5449
+ * maxiCodeCodetext.setServiceCategory(999);
5450
+ * let maxiCodeStructuredSecondMessage = new MaxiCodeStructuredSecondMessage();
5451
+ * maxiCodeStructuredSecondMessage.add("634 ALPHA DRIVE");
5452
+ * maxiCodeStructuredSecondMessage.add("PITTSBURGH");
5453
+ * maxiCodeStructuredSecondMessage.add("PA");
5454
+ * maxiCodeStructuredSecondMessage.setYear(99);
5455
+ * maxiCodeCodetext.setSecondMessage(maxiCodeStructuredSecondMessage);
5456
+ * let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext.getConstructedCodetext();
5457
+ * complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
5458
+ *
5459
+ * //Mode 4
5460
+ * let maxiCodeCodetext = new MaxiCodeStandardCodetext();
5461
+ * maxiCodeCodetext.setMode(MaxiCodeMode.MODE_4);
5462
+ * maxiCodeCodetext.setMessage("Test message");
5463
+ * let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext.getConstructedCodetext();
5464
+ * complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
5465
+ *
5466
+ * //Mode 5
5467
+ * let maxiCodeCodetext = new MaxiCodeStandardCodetext();
5468
+ * maxiCodeCodetext.setMode(MaxiCodeMode.MODE_5);
5469
+ * maxiCodeCodetext.setMessage("Test message");
5470
+ * let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext.getConstructedCodetext())
5471
+ * complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
5472
+ *
5473
+ * //Mode 6
5474
+ * let maxiCodeCodetext = new MaxiCodeStandardCodetext();
5475
+ * maxiCodeCodetext.setMode(MaxiCodeMode.MODE_6);
5476
+ * maxiCodeCodetext.setMessage("Test message");
5477
+ * let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext.getConstructedCodetext();
5478
+ * complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
5479
+ */
5480
+ MaxiCodeMode =
5481
+ {
5482
+
5483
+ /**
5484
+ * Mode 2 encodes postal information in first message and data in second message.
5485
+ * Has 9 digits postal code (used only in USA).
5486
+ */
5487
+ MODE_2: 2,
5488
+
5489
+ /**
5490
+ * Mode 3 encodes postal information in first message and data in second message.
5491
+ * Has 6 alphanumeric postal code, used in the world.
5492
+ */
5493
+ MODE_3: 3,
5494
+
5495
+ /**
5496
+ * Mode 4 encodes data in first and second message, with short ECC correction.
5497
+ */
5498
+ MODE_4: 4,
5499
+
5500
+ /**
5501
+ * Mode 5 encodes data in first and second message, with long ECC correction.
5502
+ */
5503
+ MODE_5: 5,
5504
+
5505
+ /**
5506
+ * Mode 6 encodes data in first and second message, with short ECC correction.
5507
+ * Used to encode device.
5508
+ */
5509
+ MODE_6: 6
5510
+ }
5511
+
5167
5512
  module.exports = {
5168
5513
  BarcodeGenerator,
5169
5514
  EncodeTypes,
@@ -5221,5 +5566,7 @@ module.exports = {
5221
5566
  MacroCharacter,
5222
5567
  EnableChecksum,
5223
5568
  TwoDComponentType,
5224
- GS1CompositeBarParameters
5569
+ GS1CompositeBarParameters,
5570
+ Pdf417MacroTerminator,
5571
+ MaxiCodeExtCodetextBuilder
5225
5572
  };
package/lib/Joint.js CHANGED
@@ -288,7 +288,7 @@ class Rectangle extends BaseJavaClass
288
288
 
289
289
  equals(obj)
290
290
  {
291
- return this.getJavaClass().equals(obj.getJavaClass());
291
+ return this.getJavaClass().equalsSync(obj.getJavaClass());
292
292
  }
293
293
 
294
294
  /**
@@ -400,7 +400,7 @@ class Point extends BaseJavaClass
400
400
 
401
401
  equals(obj)
402
402
  {
403
- return this.getJavaClass().equals(obj.getJavaClass());
403
+ return this.getJavaClass().equalsSync(obj.getJavaClass());
404
404
  }
405
405
  }
406
406