aspose.barcode 22.10.1 → 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
|
{
|
|
@@ -3023,6 +3023,22 @@ class MaxiCodeParameters extends joint.BaseJavaClass
|
|
|
3023
3023
|
{
|
|
3024
3024
|
}
|
|
3025
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
|
+
|
|
3026
3042
|
/**
|
|
3027
3043
|
* Gets a MaxiCode encode mode.
|
|
3028
3044
|
*/
|
|
@@ -3039,6 +3055,64 @@ class MaxiCodeParameters extends joint.BaseJavaClass
|
|
|
3039
3055
|
this.getJavaClass().setMaxiCodeEncodeModeSync(value);
|
|
3040
3056
|
}
|
|
3041
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
|
+
|
|
3042
3116
|
/**
|
|
3043
3117
|
* Height/Width ratio of 2D BarCode module.
|
|
3044
3118
|
*/
|
|
@@ -3384,7 +3458,6 @@ class FontUnit extends joint.BaseJavaClass
|
|
|
3384
3458
|
*/
|
|
3385
3459
|
class ExtCodetextBuilder extends joint.BaseJavaClass
|
|
3386
3460
|
{
|
|
3387
|
-
|
|
3388
3461
|
constructor(javaClass)
|
|
3389
3462
|
{
|
|
3390
3463
|
super(javaClass);
|
|
@@ -3485,7 +3558,8 @@ class QrExtCodetextBuilder extends ExtCodetextBuilder
|
|
|
3485
3558
|
|
|
3486
3559
|
constructor()
|
|
3487
3560
|
{
|
|
3488
|
-
|
|
3561
|
+
let java_class = java.import(QrExtCodetextBuilder.javaClassName);
|
|
3562
|
+
super(new java_class());
|
|
3489
3563
|
this.init();
|
|
3490
3564
|
}
|
|
3491
3565
|
|
|
@@ -3605,6 +3679,60 @@ class QrStructuredAppendParameters extends joint.BaseJavaClass
|
|
|
3605
3679
|
}
|
|
3606
3680
|
}
|
|
3607
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
|
+
|
|
3608
3736
|
/**
|
|
3609
3737
|
* BarcodeClassifications EncodeTypes classification
|
|
3610
3738
|
* @enum
|
|
@@ -3738,7 +3866,7 @@ DataMatrixEncodeMode =
|
|
|
3738
3866
|
* $generator->setCodeText("\\ansix12:ANSIX12TEXT\\ascii:backslash must be \\\\ doubled\\edifact:EdifactEncodedText");
|
|
3739
3867
|
* $generator->getParameters()->getBarcode()->getDataMatrix().setDataMatrixEncodeMode(DataMatrixEncodeMode.EXTENDED_CODETEXT);
|
|
3740
3868
|
* $generator->getParameters()->getBarcode()->getCodeTextParameters().setTwoDDisplayText("My Text");
|
|
3741
|
-
* $generator->save("test.png");
|
|
3869
|
+
* $generator->save("test.png", BarcodeImageFormat.PNG);
|
|
3742
3870
|
*/
|
|
3743
3871
|
EXTENDED_CODETEXT: 12
|
|
3744
3872
|
};
|
|
@@ -3804,12 +3932,12 @@ ITF14BorderType =
|
|
|
3804
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.
|
|
3805
3933
|
* @example
|
|
3806
3934
|
* //Example how to use ECI encoding
|
|
3807
|
-
*
|
|
3935
|
+
* let generator = new BarcodeGenerator(EncodeTypes.QR);
|
|
3808
3936
|
* generator.setCodeText("12345TEXT");
|
|
3809
3937
|
* generator.getParameters().getBarcode().getQR().setQrEncodeMode(QREncodeMode.ECI_ENCODING);
|
|
3810
3938
|
* generator.getParameters().getBarcode().getQR().setQrEncodeType(QREncodeType.FORCE_QR);
|
|
3811
3939
|
* generator.getParameters().getBarcode().getQR().setQrECIEncoding(ECIEncodings.UTF8);
|
|
3812
|
-
* generator.save("test.png");
|
|
3940
|
+
* generator.save("test.png", BarcodeImageFormat.PNG);
|
|
3813
3941
|
*
|
|
3814
3942
|
* @example
|
|
3815
3943
|
* //Example how to use FNC1 first position in Extended Mode
|
|
@@ -3818,11 +3946,11 @@ ITF14BorderType =
|
|
|
3818
3946
|
* textBuilder.addFNC1GroupSeparator();
|
|
3819
3947
|
* textBuilder.addPlainCodetext("12345<FNC1>");
|
|
3820
3948
|
* //generate barcode
|
|
3821
|
-
*
|
|
3949
|
+
* let generator = new BarcodeGenerator(EncodeTypes.QR);
|
|
3822
3950
|
* generator.setCodeText(textBuilder.getExtendedCodetext());
|
|
3823
3951
|
* generator.getParameters().getBarcode().getQR().setQrEncodeMode(QREncodeMode.EXTENDED_CODETEXT);
|
|
3824
3952
|
* generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text");
|
|
3825
|
-
* generator.save("d:/test.png");
|
|
3953
|
+
* generator.save("d:/test.png", BarcodeImageFormat.PNG);
|
|
3826
3954
|
*
|
|
3827
3955
|
* @example
|
|
3828
3956
|
* // This sample shows how to use FNC1 second position in Extended Mode.
|
|
@@ -3831,10 +3959,10 @@ ITF14BorderType =
|
|
|
3831
3959
|
* textBuilder.addFNC1SecondPosition("12");
|
|
3832
3960
|
* textBuilder.addPlainCodetext("TRUE3456");
|
|
3833
3961
|
* //generate barcode
|
|
3834
|
-
*
|
|
3962
|
+
* let generator = new BarcodeGenerator(EncodeTypes.QR);
|
|
3835
3963
|
* generator.setCodeText(textBuilder.getExtendedCodetext());
|
|
3836
3964
|
* generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text");
|
|
3837
|
-
* generator.save("d:/test.png");
|
|
3965
|
+
* generator.save("d:/test.png", BarcodeImageFormat.PNG);
|
|
3838
3966
|
*
|
|
3839
3967
|
* @example
|
|
3840
3968
|
* //This sample shows how to use multi ECI mode in Extended Mode.
|
|
@@ -3845,11 +3973,11 @@ ITF14BorderType =
|
|
|
3845
3973
|
* textBuilder.addECICodetext(ECIEncodings.UTF16BE, "Power");
|
|
3846
3974
|
* textBuilder.addPlainCodetext("t\e\\st");
|
|
3847
3975
|
* //generate barcode
|
|
3848
|
-
*
|
|
3976
|
+
* let generator = new BarcodeGenerator(EncodeTypes.QR);
|
|
3849
3977
|
* generator.setCodeText(textBuilder.getExtendedCodetext());
|
|
3850
3978
|
* generator.getParameters().getBarcode().getQR().setQrEncodeMode(QREncodeMode.EXTENDED_CODETEXT);
|
|
3851
3979
|
* generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text");
|
|
3852
|
-
* generator.save("d:/test.png");
|
|
3980
|
+
* generator.save("d:/test.png", BarcodeImageFormat.PNG);
|
|
3853
3981
|
* @enum
|
|
3854
3982
|
*/
|
|
3855
3983
|
QREncodeMode =
|
|
@@ -4411,7 +4539,7 @@ TextAlignment =
|
|
|
4411
4539
|
* generator.setAutoSizeMode(AutoSizeMode.NEAREST);
|
|
4412
4540
|
* generator.getBarCodeWidth().setMillimeters(50);
|
|
4413
4541
|
* generator.getBarCodeHeight().setInches(1.3f);
|
|
4414
|
-
* generator.save("test.png");
|
|
4542
|
+
* generator.save("test.png", BarcodeImageFormat.PNG);
|
|
4415
4543
|
*
|
|
4416
4544
|
* @enum
|
|
4417
4545
|
*/
|
|
@@ -4439,7 +4567,7 @@ AutoSizeMode =
|
|
|
4439
4567
|
* generator.getParameters().getBarcode().setAutoSizeMode(AutoSizeMode.INTERPOLATION);
|
|
4440
4568
|
* generator.getParameters().getBarcode().getBarCodeWidth().setMillimeters(50);
|
|
4441
4569
|
* generator.getParameters().getBarcode().getBarCodeHeight().setInches(1.3);
|
|
4442
|
-
* generator.save("test.png");
|
|
4570
|
+
* generator.save("test.png", BarcodeImageFormat.PNG);
|
|
4443
4571
|
*/
|
|
4444
4572
|
INTERPOLATION: 2,
|
|
4445
4573
|
};
|
|
@@ -4868,7 +4996,7 @@ MacroCharacter =
|
|
|
4868
4996
|
* //to generate autoidentified GS1 message like this "(10)123ABC(10)123ABC" in ISO 15434 format you need:
|
|
4869
4997
|
* let generator = new BarcodeGenerator(EncodeTypes.DATA_MATRIX, "10123ABC\u001D10123ABC");
|
|
4870
4998
|
* generator.getParameters().getBarcode().getDataMatrix().setMacroCharacters(MacroCharacter.MACRO_05);
|
|
4871
|
-
* 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);
|
|
4872
5000
|
* reader.readBarCodes().forEach(function(result, i, results)
|
|
4873
5001
|
* {
|
|
4874
5002
|
* cosole.log("BarCode CodeText: " + result.getCodeText());
|
|
@@ -5205,6 +5333,182 @@ Pdf417MacroTerminator =
|
|
|
5205
5333
|
SET: 2
|
|
5206
5334
|
}
|
|
5207
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
|
+
|
|
5208
5512
|
module.exports = {
|
|
5209
5513
|
BarcodeGenerator,
|
|
5210
5514
|
EncodeTypes,
|
|
@@ -5263,5 +5567,6 @@ module.exports = {
|
|
|
5263
5567
|
EnableChecksum,
|
|
5264
5568
|
TwoDComponentType,
|
|
5265
5569
|
GS1CompositeBarParameters,
|
|
5266
|
-
Pdf417MacroTerminator
|
|
5570
|
+
Pdf417MacroTerminator,
|
|
5571
|
+
MaxiCodeExtCodetextBuilder
|
|
5267
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().
|
|
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().
|
|
403
|
+
return this.getJavaClass().equalsSync(obj.getJavaClass());
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
|