aspose.barcode 23.5.0 → 23.6.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/AsposeBarcode.js +1 -1
- package/lib/ComplexBarcode.js +763 -755
- package/lib/Generation.js +1132 -326
- package/lib/Joint.js +56 -2
- package/lib/Recognition.js +178 -90
- package/lib/{aspose-barcode-nodejs-23.5.jar → aspose-barcode-nodejs-23.6.jar} +0 -0
- package/package.json +1 -1
package/lib/Generation.js
CHANGED
|
@@ -13,7 +13,7 @@ const joint = require("./Joint");
|
|
|
13
13
|
* EAN14, SCC14, SSCC18, ITF14, SingaporePost ...
|
|
14
14
|
* 2D:
|
|
15
15
|
* Aztec, DataMatrix, PDf417, QR code ...
|
|
16
|
-
|
|
16
|
+
* @example
|
|
17
17
|
* // This sample shows how to create and save a barcode image.
|
|
18
18
|
* let encode_type = EncodeTypes.CODE_128;
|
|
19
19
|
* let generator = new BarcodeGenerator(encode_type);
|
|
@@ -203,6 +203,7 @@ class BarcodeParameters extends joint.BaseJavaClass
|
|
|
203
203
|
code128;
|
|
204
204
|
codabar;
|
|
205
205
|
coupon;
|
|
206
|
+
hanXin;
|
|
206
207
|
supplement;
|
|
207
208
|
dotCode;
|
|
208
209
|
padding;
|
|
@@ -236,6 +237,7 @@ class BarcodeParameters extends joint.BaseJavaClass
|
|
|
236
237
|
this.code128 = new Code128Parameters(this.getJavaClass().getCode128Sync());
|
|
237
238
|
this.codabar = new CodabarParameters(this.getJavaClass().getCodabarSync());
|
|
238
239
|
this.coupon = new CouponParameters(this.getJavaClass().getCouponSync());
|
|
240
|
+
this.hanXin = new HanXinParameters(this.getJavaClass().getHanXinSync());
|
|
239
241
|
this.supplement = new SupplementParameters(this.getJavaClass().getSupplementSync());
|
|
240
242
|
this.dotCode = new DotCodeParameters(this.getJavaClass().getDotCodeSync());
|
|
241
243
|
this.padding = new Padding(this.getJavaClass().getPaddingSync());
|
|
@@ -243,8 +245,8 @@ class BarcodeParameters extends joint.BaseJavaClass
|
|
|
243
245
|
}
|
|
244
246
|
|
|
245
247
|
/**
|
|
246
|
-
* x-dimension is the smallest width of the unit of BarCode bars or spaces
|
|
247
|
-
* Increase this will increase the whole barcode image width
|
|
248
|
+
* x-dimension is the smallest width of the unit of BarCode bars or spaces.<br>
|
|
249
|
+
* Increase this will increase the whole barcode image width.<br>
|
|
248
250
|
* Ignored if AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION.
|
|
249
251
|
*/
|
|
250
252
|
getXDimension()
|
|
@@ -253,8 +255,8 @@ class BarcodeParameters extends joint.BaseJavaClass
|
|
|
253
255
|
}
|
|
254
256
|
|
|
255
257
|
/**
|
|
256
|
-
* x-dimension is the smallest width of the unit of BarCode bars or spaces
|
|
257
|
-
* Increase this will increase the whole barcode image width
|
|
258
|
+
* x-dimension is the smallest width of the unit of BarCode bars or spaces.<br>
|
|
259
|
+
* Increase this will increase the whole barcode image width.<br>
|
|
258
260
|
* Ignored if AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION.
|
|
259
261
|
* @throws BarcodeException
|
|
260
262
|
*/
|
|
@@ -265,7 +267,7 @@ class BarcodeParameters extends joint.BaseJavaClass
|
|
|
265
267
|
}
|
|
266
268
|
|
|
267
269
|
/**
|
|
268
|
-
* Height of 1D barcodes' bars in Unit value
|
|
270
|
+
* Height of 1D barcodes' bars in Unit value.<br>
|
|
269
271
|
* Ignored if AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION.
|
|
270
272
|
* @throws BarcodeException
|
|
271
273
|
*/
|
|
@@ -275,7 +277,7 @@ class BarcodeParameters extends joint.BaseJavaClass
|
|
|
275
277
|
}
|
|
276
278
|
|
|
277
279
|
/**
|
|
278
|
-
* Height of 1D barcodes' bars in Unit value
|
|
280
|
+
* Height of 1D barcodes' bars in Unit value.<br>
|
|
279
281
|
* Ignored if AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION.
|
|
280
282
|
* @throws BarcodeException
|
|
281
283
|
*/
|
|
@@ -313,7 +315,7 @@ class BarcodeParameters extends joint.BaseJavaClass
|
|
|
313
315
|
}
|
|
314
316
|
|
|
315
317
|
/**
|
|
316
|
-
* Barcode paddings
|
|
318
|
+
* Barcode paddings.<br>
|
|
317
319
|
* Default value: 5pt 5pt 5pt 5pt.
|
|
318
320
|
*/
|
|
319
321
|
getPadding()
|
|
@@ -322,7 +324,7 @@ class BarcodeParameters extends joint.BaseJavaClass
|
|
|
322
324
|
}
|
|
323
325
|
|
|
324
326
|
/**
|
|
325
|
-
* Barcode paddings
|
|
327
|
+
* Barcode paddings.<br>
|
|
326
328
|
* Default value: 5pt 5pt 5pt 5pt.
|
|
327
329
|
*/
|
|
328
330
|
setPadding(value)
|
|
@@ -348,9 +350,9 @@ class BarcodeParameters extends joint.BaseJavaClass
|
|
|
348
350
|
}
|
|
349
351
|
|
|
350
352
|
/**
|
|
351
|
-
* Enable checksum during generation 1D barcodes
|
|
352
|
-
* Default is treated as Yes for symbology which must contain checksum, as No where checksum only possible
|
|
353
|
-
* Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar
|
|
353
|
+
* Enable checksum during generation 1D barcodes.<br>
|
|
354
|
+
* Default is treated as Yes for symbology which must contain checksum, as No where checksum only possible.<br>
|
|
355
|
+
* Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar<br>
|
|
354
356
|
* Checksum always used: Rest symbology
|
|
355
357
|
*/
|
|
356
358
|
isChecksumEnabled()
|
|
@@ -359,9 +361,9 @@ class BarcodeParameters extends joint.BaseJavaClass
|
|
|
359
361
|
}
|
|
360
362
|
|
|
361
363
|
/**
|
|
362
|
-
* Enable checksum during generation 1D barcodes
|
|
363
|
-
* Default is treated as Yes for symbology which must contain checksum, as No where checksum only possible
|
|
364
|
-
* Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar
|
|
364
|
+
* Enable checksum during generation 1D barcodes.<br>
|
|
365
|
+
* Default is treated as Yes for symbology which must contain checksum, as No where checksum only possible.<br>
|
|
366
|
+
* Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar<br>
|
|
365
367
|
* Checksum always used: Rest symbology
|
|
366
368
|
*/
|
|
367
369
|
setChecksumEnabled(value)
|
|
@@ -370,8 +372,8 @@ class BarcodeParameters extends joint.BaseJavaClass
|
|
|
370
372
|
}
|
|
371
373
|
|
|
372
374
|
/**
|
|
373
|
-
* Indicates whether explains the character "\" as an escape character in CodeText property. Used for Pdf417, DataMatrix, Code128 only
|
|
374
|
-
* If the EnableEscape is true, "\" will be explained as a special escape character. Otherwise, "\" acts as normal characters
|
|
375
|
+
* Indicates whether explains the character "\" as an escape character in CodeText property. Used for Pdf417, DataMatrix, Code128 only<br>
|
|
376
|
+
* If the EnableEscape is true, "\" will be explained as a special escape character. Otherwise, "\" acts as normal characters.<br>
|
|
375
377
|
* Aspose.BarCode supports inputing decimal ascii code and mnemonic for ASCII control-code characters. For example, \013 and \\CR stands for CR.
|
|
376
378
|
*/
|
|
377
379
|
getEnableEscape()
|
|
@@ -406,7 +408,7 @@ class BarcodeParameters extends joint.BaseJavaClass
|
|
|
406
408
|
* Default value: 3, that is, wide bars are 3 times as wide as narrow bars.<br>
|
|
407
409
|
* Used for ITF, PZN, PharmaCode, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, IATA2of5, <br>
|
|
408
410
|
* VIN, DeutschePost, OPC, Code32, DataLogic2of5, PatchCode, Code39Extended, Code39Standard<br>
|
|
409
|
-
*
|
|
411
|
+
* <br>
|
|
410
412
|
* The WideNarrowRatio parameter value is less than or equal to 0.
|
|
411
413
|
*/
|
|
412
414
|
setWideNarrowRatio(value)
|
|
@@ -495,11 +497,12 @@ class BarcodeParameters extends joint.BaseJavaClass
|
|
|
495
497
|
}
|
|
496
498
|
|
|
497
499
|
/**
|
|
498
|
-
* GS1 Composite Bar parameters
|
|
499
|
-
*
|
|
500
|
-
* This sample shows how to create and save a GS1 Composite Bar image
|
|
500
|
+
* GS1 Composite Bar parameters.<br>
|
|
501
|
+
* <br>
|
|
502
|
+
* This sample shows how to create and save a GS1 Composite Bar image.<br>
|
|
501
503
|
* Note that 1D codetext and 2D codetext are separated by symbol '/'
|
|
502
504
|
*
|
|
505
|
+
* @example
|
|
503
506
|
* let codetext = "(01)03212345678906/(21)A1B2C3D4E5F6G7H8";
|
|
504
507
|
* let generator = new BarcodeGenerator(EncodeTypes.GS_1_COMPOSITE_BAR, codetext);
|
|
505
508
|
*
|
|
@@ -525,11 +528,12 @@ class BarcodeParameters extends joint.BaseJavaClass
|
|
|
525
528
|
}
|
|
526
529
|
|
|
527
530
|
/**
|
|
528
|
-
* GS1 Composite Bar parameters
|
|
529
|
-
*
|
|
530
|
-
* This sample shows how to create and save a GS1 Composite Bar image
|
|
531
|
+
* GS1 Composite Bar parameters.<br>
|
|
532
|
+
* <br>
|
|
533
|
+
* This sample shows how to create and save a GS1 Composite Bar image.<br>
|
|
531
534
|
* Note that 1D codetext and 2D codetext are separated by symbol '/'
|
|
532
535
|
*
|
|
536
|
+
* @example
|
|
533
537
|
* let codetext = "(01)03212345678906/(21)A1B2C3D4E5F6G7H8";
|
|
534
538
|
* let generator = new BarcodeGenerator(EncodeTypes.GS_1_COMPOSITE_BAR, codetext);
|
|
535
539
|
*
|
|
@@ -541,10 +545,10 @@ class BarcodeParameters extends joint.BaseJavaClass
|
|
|
541
545
|
*
|
|
542
546
|
* // X-Dimension of 1D and 2D components
|
|
543
547
|
* generator.getParameters().getBarcode().getXDimension().setPixels(3);
|
|
544
|
-
*
|
|
548
|
+
*
|
|
545
549
|
* // Height of 1D component
|
|
546
550
|
* generator.getParameters().getBarcode().getBarHeight().setPixels(100);
|
|
547
|
-
*
|
|
551
|
+
*
|
|
548
552
|
* generator.save("test.png", BarcodeImageFormat.PNG);
|
|
549
553
|
*/
|
|
550
554
|
setGS1CompositeBar(value)
|
|
@@ -658,6 +662,14 @@ class BarcodeParameters extends joint.BaseJavaClass
|
|
|
658
662
|
{
|
|
659
663
|
return this.coupon;
|
|
660
664
|
}
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* HanXin parameters.
|
|
668
|
+
*/
|
|
669
|
+
getHanXin()
|
|
670
|
+
{
|
|
671
|
+
return this.hanXin;
|
|
672
|
+
}
|
|
661
673
|
}
|
|
662
674
|
|
|
663
675
|
/**
|
|
@@ -690,9 +702,7 @@ class BaseGenerationParameters extends joint.BaseJavaClass
|
|
|
690
702
|
}
|
|
691
703
|
|
|
692
704
|
/**
|
|
693
|
-
* <p>
|
|
694
705
|
* Gets a value indicating whether is used anti-aliasing mode to render image
|
|
695
|
-
* </p>
|
|
696
706
|
*/
|
|
697
707
|
getUseAntiAlias()
|
|
698
708
|
{
|
|
@@ -700,9 +710,7 @@ class BaseGenerationParameters extends joint.BaseJavaClass
|
|
|
700
710
|
}
|
|
701
711
|
|
|
702
712
|
/**
|
|
703
|
-
* <p>
|
|
704
713
|
* Sets a value indicating whether is used anti-aliasing mode to render image
|
|
705
|
-
* </p>
|
|
706
714
|
*/
|
|
707
715
|
setUseAntiAlias(value)
|
|
708
716
|
{
|
|
@@ -735,10 +743,11 @@ class BaseGenerationParameters extends joint.BaseJavaClass
|
|
|
735
743
|
}
|
|
736
744
|
|
|
737
745
|
/**
|
|
746
|
+
* <p>
|
|
738
747
|
* Gets the resolution of the BarCode image.<br>
|
|
739
748
|
* One value for both dimensions.<br>
|
|
740
749
|
* Default value: 96 dpi.<br>
|
|
741
|
-
*
|
|
750
|
+
* </p>
|
|
742
751
|
* The Resolution parameter value is less than or equal to 0.
|
|
743
752
|
*/
|
|
744
753
|
getResolution()
|
|
@@ -747,9 +756,11 @@ class BaseGenerationParameters extends joint.BaseJavaClass
|
|
|
747
756
|
}
|
|
748
757
|
|
|
749
758
|
/**
|
|
759
|
+
* <p>
|
|
750
760
|
* Sets the resolution of the BarCode image.<br>
|
|
751
761
|
* One value for both dimensions.<br>
|
|
752
762
|
* Default value: 96 dpi.<br>
|
|
763
|
+
* </p>
|
|
753
764
|
*
|
|
754
765
|
* The Resolution parameter value is less than or equal to 0.
|
|
755
766
|
*/
|
|
@@ -922,7 +933,7 @@ class BorderParameters extends joint.BaseJavaClass
|
|
|
922
933
|
}
|
|
923
934
|
|
|
924
935
|
/**
|
|
925
|
-
* Border visibility. If false than parameter Width is always ignored (0)
|
|
936
|
+
* Border visibility. If false than parameter Width is always ignored (0).<br>
|
|
926
937
|
* Default value: false.
|
|
927
938
|
*/
|
|
928
939
|
getVisible()
|
|
@@ -931,7 +942,7 @@ class BorderParameters extends joint.BaseJavaClass
|
|
|
931
942
|
}
|
|
932
943
|
|
|
933
944
|
/**
|
|
934
|
-
* Border visibility. If false than parameter Width is always ignored (0)
|
|
945
|
+
* Border visibility. If false than parameter Width is always ignored (0).<br>
|
|
935
946
|
* Default value: false.
|
|
936
947
|
*/
|
|
937
948
|
setVisible(value)
|
|
@@ -1013,54 +1024,6 @@ class BorderParameters extends joint.BaseJavaClass
|
|
|
1013
1024
|
}
|
|
1014
1025
|
}
|
|
1015
1026
|
|
|
1016
|
-
/**
|
|
1017
|
-
* Enable checksum validation during recognition for 1D barcodes.
|
|
1018
|
-
* Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible.
|
|
1019
|
-
* Checksum never used: Codabar
|
|
1020
|
-
* Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN
|
|
1021
|
-
* Checksum always used: Rest symbologies
|
|
1022
|
-
* @example
|
|
1023
|
-
* //This sample shows influence of ChecksumValidation on recognition quality and results
|
|
1024
|
-
* let generator = new BarcodeGenerator(EncodeTypes.EAN_13, "1234567890128");
|
|
1025
|
-
* generator.save("test.png", BarcodeImageFormat.PNG);
|
|
1026
|
-
* let reader = new BarCodeReader("test.png", DecodeType.EAN_13);
|
|
1027
|
-
* //checksum disabled
|
|
1028
|
-
* reader.setChecksumValidation(ChecksumValidation.OFF);
|
|
1029
|
-
* reader.readBarCodes().forEach(function(result, i, results)
|
|
1030
|
-
* {
|
|
1031
|
-
* console.log("BarCode CodeText: " + result.getCodeText());
|
|
1032
|
-
* console.log("BarCode Value: " + result.getExtended().getOneD().getValue());
|
|
1033
|
-
* console.log("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
|
|
1034
|
-
* });
|
|
1035
|
-
* let reader = new BarCodeReader("test.png", DecodeType.EAN_13);
|
|
1036
|
-
* //checksum enabled
|
|
1037
|
-
* reader.setChecksumValidation(ChecksumValidation.ON);
|
|
1038
|
-
* reader.readBarCodes().forEach(function(result, i, results)
|
|
1039
|
-
* {
|
|
1040
|
-
* console.log("BarCode CodeText: " + result.getCodeText());
|
|
1041
|
-
* console.log("BarCode Value: " + result.getExtended().getOneD().getValue());
|
|
1042
|
-
* console.log("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
|
|
1043
|
-
* });
|
|
1044
|
-
* @enum
|
|
1045
|
-
*/
|
|
1046
|
-
ChecksumValidation =
|
|
1047
|
-
{
|
|
1048
|
-
/**
|
|
1049
|
-
* If checksum is required by the specification - it will be validated.
|
|
1050
|
-
*/
|
|
1051
|
-
DEFAULT: 0,
|
|
1052
|
-
|
|
1053
|
-
/**
|
|
1054
|
-
* Always validate checksum if possible.
|
|
1055
|
-
*/
|
|
1056
|
-
ON: 1,
|
|
1057
|
-
|
|
1058
|
-
/**
|
|
1059
|
-
* Do not validate checksum.
|
|
1060
|
-
*/
|
|
1061
|
-
OFF: 2
|
|
1062
|
-
};
|
|
1063
|
-
|
|
1064
1027
|
/**
|
|
1065
1028
|
* Caption parameters.
|
|
1066
1029
|
*/
|
|
@@ -1175,7 +1138,7 @@ class CaptionParameters extends joint.BaseJavaClass
|
|
|
1175
1138
|
|
|
1176
1139
|
/**
|
|
1177
1140
|
* Caption test horizontal alignment.<br>
|
|
1178
|
-
* Default
|
|
1141
|
+
* Default TextAlignment.CENTER.
|
|
1179
1142
|
*/
|
|
1180
1143
|
getAlignment()
|
|
1181
1144
|
{
|
|
@@ -1184,7 +1147,7 @@ class CaptionParameters extends joint.BaseJavaClass
|
|
|
1184
1147
|
|
|
1185
1148
|
/**
|
|
1186
1149
|
* Caption test horizontal alignment.<br>
|
|
1187
|
-
* Default
|
|
1150
|
+
* Default TextAlignment.CENTER.
|
|
1188
1151
|
*/
|
|
1189
1152
|
setAlignment(value)
|
|
1190
1153
|
{
|
|
@@ -1320,7 +1283,7 @@ class Unit extends joint.BaseJavaClass
|
|
|
1320
1283
|
}
|
|
1321
1284
|
|
|
1322
1285
|
/**
|
|
1323
|
-
* Returns a human-readable string representation of this Unit
|
|
1286
|
+
* Returns a human-readable string representation of this Unit.<br>
|
|
1324
1287
|
* @return A string that represents this Unit.
|
|
1325
1288
|
*/
|
|
1326
1289
|
toString()
|
|
@@ -2236,10 +2199,8 @@ class DotCodeParameters extends joint.BaseJavaClass
|
|
|
2236
2199
|
}
|
|
2237
2200
|
|
|
2238
2201
|
/**
|
|
2239
|
-
*
|
|
2240
|
-
* Identifies DotCode encode mode.
|
|
2202
|
+
* Identifies DotCode encode mode.<br>
|
|
2241
2203
|
* Default value: Auto.
|
|
2242
|
-
* </p>
|
|
2243
2204
|
*/
|
|
2244
2205
|
getDotCodeEncodeMode()
|
|
2245
2206
|
{
|
|
@@ -2248,8 +2209,8 @@ class DotCodeParameters extends joint.BaseJavaClass
|
|
|
2248
2209
|
/**
|
|
2249
2210
|
* <p>
|
|
2250
2211
|
* Identifies DotCode encode mode.
|
|
2251
|
-
* Default value: Auto.
|
|
2252
2212
|
* </p>
|
|
2213
|
+
* Default value: Auto.
|
|
2253
2214
|
*/
|
|
2254
2215
|
setDotCodeEncodeMode(value)
|
|
2255
2216
|
{
|
|
@@ -2259,19 +2220,19 @@ class DotCodeParameters extends joint.BaseJavaClass
|
|
|
2259
2220
|
/**
|
|
2260
2221
|
* <p>
|
|
2261
2222
|
* Indicates whether code is used for instruct reader to interpret the following data as instructions for initialization or reprogramming of the bar code reader.
|
|
2262
|
-
* Default value is false.
|
|
2263
2223
|
* </p>
|
|
2224
|
+
* Default value is false.
|
|
2264
2225
|
*/
|
|
2265
2226
|
isReaderInitialization()
|
|
2266
2227
|
{ return this.getJavaClass().isReaderInitializationSync(); }
|
|
2267
2228
|
/**
|
|
2268
2229
|
* <p>
|
|
2269
2230
|
* Indicates whether code is used for instruct reader to interpret the following data as instructions for initialization or reprogramming of the bar code reader.
|
|
2270
|
-
* Default value is false.
|
|
2271
2231
|
* </p>
|
|
2232
|
+
* Default value is false.
|
|
2272
2233
|
*/
|
|
2273
2234
|
setReaderInitialization(value)
|
|
2274
|
-
|
|
2235
|
+
{ this.getJavaClass().setReaderInitializationSync(value); }
|
|
2275
2236
|
|
|
2276
2237
|
/**
|
|
2277
2238
|
* <p>
|
|
@@ -2302,61 +2263,61 @@ class DotCodeParameters extends joint.BaseJavaClass
|
|
|
2302
2263
|
* </p>
|
|
2303
2264
|
*/
|
|
2304
2265
|
setDotCodeStructuredAppendModeBarcodesCount(value)
|
|
2305
|
-
|
|
2266
|
+
{ this.getJavaClass().setDotCodeStructuredAppendModeBarcodesCountSync(value); }
|
|
2306
2267
|
|
|
2307
2268
|
/**
|
|
2308
2269
|
* <p>
|
|
2309
|
-
* Identifies ECI encoding. Used when DotCodeEncodeMode is
|
|
2310
|
-
* Default value: ISO-8859-1
|
|
2270
|
+
* Identifies ECI encoding. Used when DotCodeEncodeMode is AUTO.
|
|
2311
2271
|
* </p>
|
|
2272
|
+
* Default value: ISO-8859-1
|
|
2312
2273
|
*/
|
|
2313
2274
|
getECIEncoding()
|
|
2314
2275
|
{ return this.getJavaClass().getECIEncodingSync(); }
|
|
2315
2276
|
/**
|
|
2316
2277
|
* <p>
|
|
2317
|
-
* Identifies ECI encoding. Used when DotCodeEncodeMode is
|
|
2278
|
+
* Identifies ECI encoding. Used when DotCodeEncodeMode is AUTO.<br>
|
|
2318
2279
|
* Default value: ISO-8859-1
|
|
2319
2280
|
* </p>
|
|
2320
2281
|
*/
|
|
2321
2282
|
setECIEncoding(value)
|
|
2322
|
-
|
|
2283
|
+
{ this.getJavaClass().setECIEncodingSync(value); }
|
|
2323
2284
|
|
|
2324
2285
|
/**
|
|
2325
2286
|
* <p>
|
|
2326
2287
|
* Identifies rows count. Sum of the number of rows plus the number of columns of a DotCode symbol must be odd. Number of rows must be at least 5.
|
|
2327
|
-
* Default value: -1
|
|
2328
2288
|
* </p>
|
|
2289
|
+
* Default value: -1
|
|
2329
2290
|
*/
|
|
2330
2291
|
getRows()
|
|
2331
2292
|
{ return this.getJavaClass().getRowsSync(); }
|
|
2332
2293
|
/**
|
|
2333
2294
|
* <p>
|
|
2334
2295
|
* Identifies rows count. Sum of the number of rows plus the number of columns of a DotCode symbol must be odd. Number of rows must be at least 5.
|
|
2335
|
-
* Default value: -1
|
|
2336
2296
|
* </p>
|
|
2297
|
+
* Default value: -1
|
|
2337
2298
|
*/
|
|
2338
2299
|
setRows(value)
|
|
2339
|
-
|
|
2340
|
-
|
|
2300
|
+
{
|
|
2301
|
+
this.getJavaClass().setRowsSync(value);
|
|
2341
2302
|
}
|
|
2342
2303
|
|
|
2343
2304
|
/**
|
|
2344
2305
|
* <p>
|
|
2345
2306
|
* Identifies columns count. Sum of the number of rows plus the number of columns of a DotCode symbol must be odd. Number of columns must be at least 5.
|
|
2346
|
-
* Default value: -1
|
|
2347
2307
|
* </p>
|
|
2308
|
+
* Default value: -1
|
|
2348
2309
|
*/
|
|
2349
2310
|
getColumns()
|
|
2350
2311
|
{ return this.getJavaClass().getColumnsSync(); }
|
|
2351
2312
|
/**
|
|
2352
2313
|
* <p>
|
|
2353
2314
|
* Identifies columns count. Sum of the number of rows plus the number of columns of a DotCode symbol must be odd. Number of columns must be at least 5.
|
|
2354
|
-
* Default value: -1
|
|
2355
2315
|
* </p>
|
|
2316
|
+
* Default value: -1
|
|
2356
2317
|
*/
|
|
2357
2318
|
setColumns(value)
|
|
2358
|
-
|
|
2359
|
-
|
|
2319
|
+
{
|
|
2320
|
+
this.getJavaClass().setColumnsSync(value);
|
|
2360
2321
|
}
|
|
2361
2322
|
|
|
2362
2323
|
/**
|
|
@@ -2385,6 +2346,9 @@ class DotCodeParameters extends joint.BaseJavaClass
|
|
|
2385
2346
|
}
|
|
2386
2347
|
}
|
|
2387
2348
|
|
|
2349
|
+
/**
|
|
2350
|
+
* GS1 Composite bar parameters.
|
|
2351
|
+
*/
|
|
2388
2352
|
class GS1CompositeBarParameters extends joint.BaseJavaClass
|
|
2389
2353
|
{
|
|
2390
2354
|
constructor(javaClass)
|
|
@@ -3023,7 +2987,7 @@ class Pdf417Parameters extends joint.BaseJavaClass
|
|
|
3023
2987
|
}
|
|
3024
2988
|
|
|
3025
2989
|
/**
|
|
3026
|
-
* Used to tell the encoder whether to add Macro PDF417 Terminator (codeword 922) to the segment
|
|
2990
|
+
* Used to tell the encoder whether to add Macro PDF417 Terminator (codeword 922) to the segment.<br>
|
|
3027
2991
|
* Applied only for Macro PDF417.
|
|
3028
2992
|
*/
|
|
3029
2993
|
getPdf417MacroTerminator()
|
|
@@ -3032,7 +2996,7 @@ class Pdf417Parameters extends joint.BaseJavaClass
|
|
|
3032
2996
|
}
|
|
3033
2997
|
|
|
3034
2998
|
/**
|
|
3035
|
-
* Used to tell the encoder whether to add Macro PDF417 Terminator (codeword 922) to the segment
|
|
2999
|
+
* Used to tell the encoder whether to add Macro PDF417 Terminator (codeword 922) to the segment.<br>
|
|
3036
3000
|
* Applied only for Macro PDF417.
|
|
3037
3001
|
*/
|
|
3038
3002
|
setPdf417MacroTerminator(value)
|
|
@@ -3199,7 +3163,7 @@ class MaxiCodeParameters extends joint.BaseJavaClass
|
|
|
3199
3163
|
}
|
|
3200
3164
|
|
|
3201
3165
|
/**
|
|
3202
|
-
* Sets ECI encoding. Used when MaxiCodeEncodeMode is AUTO
|
|
3166
|
+
* Sets ECI encoding. Used when MaxiCodeEncodeMode is AUTO.<br>
|
|
3203
3167
|
* Default value: ISO-8859-1
|
|
3204
3168
|
*/
|
|
3205
3169
|
setECIEncoding(ECIEncoding)
|
|
@@ -3208,8 +3172,8 @@ class MaxiCodeParameters extends joint.BaseJavaClass
|
|
|
3208
3172
|
}
|
|
3209
3173
|
|
|
3210
3174
|
/**
|
|
3211
|
-
* Gets a MaxiCode barcode id in structured append mode
|
|
3212
|
-
* ID must be a value between 1 and 8
|
|
3175
|
+
* Gets a MaxiCode barcode id in structured append mode.<br>
|
|
3176
|
+
* ID must be a value between 1 and 8.<br>
|
|
3213
3177
|
* Default value: 0
|
|
3214
3178
|
*/
|
|
3215
3179
|
getMaxiCodeStructuredAppendModeBarcodeId()
|
|
@@ -3218,8 +3182,8 @@ class MaxiCodeParameters extends joint.BaseJavaClass
|
|
|
3218
3182
|
}
|
|
3219
3183
|
|
|
3220
3184
|
/**
|
|
3221
|
-
* Sets a MaxiCode barcode id in structured append mode
|
|
3222
|
-
* ID must be a value between 1 and 8
|
|
3185
|
+
* Sets a MaxiCode barcode id in structured append mode.<br>
|
|
3186
|
+
* ID must be a value between 1 and 8.<br>
|
|
3223
3187
|
* Default value: 0
|
|
3224
3188
|
*/
|
|
3225
3189
|
setMaxiCodeStructuredAppendModeBarcodeId(maxiCodeStructuredAppendModeBarcodeId)
|
|
@@ -3228,8 +3192,8 @@ class MaxiCodeParameters extends joint.BaseJavaClass
|
|
|
3228
3192
|
}
|
|
3229
3193
|
|
|
3230
3194
|
/**
|
|
3231
|
-
* Gets a MaxiCode barcodes count in structured append mode
|
|
3232
|
-
* Count number must be a value between 2 and 8 (maximum barcodes count)
|
|
3195
|
+
* Gets a MaxiCode barcodes count in structured append mode.<br>
|
|
3196
|
+
* Count number must be a value between 2 and 8 (maximum barcodes count).<br>
|
|
3233
3197
|
* Default value: -1
|
|
3234
3198
|
*/
|
|
3235
3199
|
getMaxiCodeStructuredAppendModeBarcodesCount()
|
|
@@ -3238,8 +3202,8 @@ class MaxiCodeParameters extends joint.BaseJavaClass
|
|
|
3238
3202
|
}
|
|
3239
3203
|
|
|
3240
3204
|
/**
|
|
3241
|
-
* Sets a MaxiCode barcodes count in structured append mode
|
|
3242
|
-
* Count number must be a value between 2 and 8 (maximum barcodes count)
|
|
3205
|
+
* Sets a MaxiCode barcodes count in structured append mode.<br>
|
|
3206
|
+
* Count number must be a value between 2 and 8 (maximum barcodes count).<br>
|
|
3243
3207
|
* Default value: -1
|
|
3244
3208
|
*/
|
|
3245
3209
|
setMaxiCodeStructuredAppendModeBarcodesCount(maxiCodeStructuredAppendModeBarcodesCount)
|
|
@@ -3680,8 +3644,6 @@ class ExtCodetextBuilder extends joint.BaseJavaClass
|
|
|
3680
3644
|
* lTextBuilder.addPlainCodetext("t\\e\\\\st");
|
|
3681
3645
|
* //generate codetext
|
|
3682
3646
|
* String lCodetext = lTextBuilder.getExtendedCodetext();
|
|
3683
|
-
*
|
|
3684
|
-
*
|
|
3685
3647
|
*/
|
|
3686
3648
|
class QrExtCodetextBuilder extends ExtCodetextBuilder
|
|
3687
3649
|
{
|
|
@@ -3765,7 +3727,7 @@ class QrStructuredAppendParameters extends joint.BaseJavaClass
|
|
|
3765
3727
|
}
|
|
3766
3728
|
|
|
3767
3729
|
/**
|
|
3768
|
-
*
|
|
3730
|
+
* Gets the QR structured append mode parity data.
|
|
3769
3731
|
*/
|
|
3770
3732
|
getParityByte()
|
|
3771
3733
|
{
|
|
@@ -3773,7 +3735,7 @@ class QrStructuredAppendParameters extends joint.BaseJavaClass
|
|
|
3773
3735
|
}
|
|
3774
3736
|
|
|
3775
3737
|
/**
|
|
3776
|
-
*
|
|
3738
|
+
* Sets the QR structured append mode parity data.
|
|
3777
3739
|
*/
|
|
3778
3740
|
setParityByte(value)
|
|
3779
3741
|
{
|
|
@@ -3819,7 +3781,7 @@ class QrStructuredAppendParameters extends joint.BaseJavaClass
|
|
|
3819
3781
|
*
|
|
3820
3782
|
* This sample shows how to use MaxiCodeExtCodetextBuilder in Extended Mode.
|
|
3821
3783
|
*
|
|
3822
|
-
*
|
|
3784
|
+
* @example
|
|
3823
3785
|
* //create codetext
|
|
3824
3786
|
* let textBuilder = new MaxiCodeExtCodetextBuilder();
|
|
3825
3787
|
* textBuilder.addECICodetext(ECIEncodings.Win1251, "Will");
|
|
@@ -3834,7 +3796,6 @@ class QrStructuredAppendParameters extends joint.BaseJavaClass
|
|
|
3834
3796
|
* let generator = new BarcodeGenerator(EncodeTypes.MAXI_CODE, codetext);
|
|
3835
3797
|
* generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text");
|
|
3836
3798
|
* generator.save("test.bmp", BarcodeImageFormat.BMP);
|
|
3837
|
-
* </pre>
|
|
3838
3799
|
*/
|
|
3839
3800
|
class MaxiCodeExtCodetextBuilder extends ExtCodetextBuilder
|
|
3840
3801
|
{
|
|
@@ -3869,10 +3830,9 @@ class MaxiCodeExtCodetextBuilder extends ExtCodetextBuilder
|
|
|
3869
3830
|
|
|
3870
3831
|
/**
|
|
3871
3832
|
* <p>
|
|
3872
|
-
*
|
|
3873
|
-
* </p
|
|
3874
|
-
*
|
|
3875
|
-
*
|
|
3833
|
+
* Extended codetext generator for 2D DotCode barcodes for ExtendedCodetext Mode of DotCodeEncodeMode
|
|
3834
|
+
* </p>
|
|
3835
|
+
* @example
|
|
3876
3836
|
* //Extended codetext mode
|
|
3877
3837
|
* //create codetext
|
|
3878
3838
|
* let textBuilder = new DotCodeExtCodetextBuilder();
|
|
@@ -3890,12 +3850,8 @@ class MaxiCodeExtCodetextBuilder extends ExtCodetextBuilder
|
|
|
3890
3850
|
* let codetext = textBuilder.getExtendedCodetext();
|
|
3891
3851
|
* //generate
|
|
3892
3852
|
* let generator = new BarcodeGenerator(EncodeTypes.DOT_CODE, codetext);
|
|
3893
|
-
*
|
|
3894
|
-
*
|
|
3895
|
-
* generator.save("test.bmp", BarCodeImageFormat.BMP);
|
|
3896
|
-
* }
|
|
3897
|
-
* </pre>
|
|
3898
|
-
* </pre></blockquote></hr></p>
|
|
3853
|
+
* generator.getParameters().getBarcode().getDotCode().setDotCodeEncodeMode(DotCodeEncodeMode.EXTENDED_CODETEXT);
|
|
3854
|
+
* generator.save("test.bmp", BarCodeImageFormat.BMP);
|
|
3899
3855
|
*/
|
|
3900
3856
|
class DotCodeExtCodetextBuilder extends ExtCodetextBuilder
|
|
3901
3857
|
{
|
|
@@ -3908,12 +3864,7 @@ class DotCodeExtCodetextBuilder extends ExtCodetextBuilder
|
|
|
3908
3864
|
super(javaClass);
|
|
3909
3865
|
}
|
|
3910
3866
|
|
|
3911
|
-
|
|
3912
|
-
{
|
|
3913
|
-
let obj = new DotCodeExtCodetextBuilder();
|
|
3914
|
-
obj.setJavaClass(javaClass)
|
|
3915
|
-
return obj;
|
|
3916
|
-
}
|
|
3867
|
+
init() {}
|
|
3917
3868
|
|
|
3918
3869
|
/**
|
|
3919
3870
|
* <p>
|
|
@@ -3967,8 +3918,6 @@ class DotCodeExtCodetextBuilder extends ExtCodetextBuilder
|
|
|
3967
3918
|
{
|
|
3968
3919
|
return this.getJavaClass().getExtendedCodetextSync();
|
|
3969
3920
|
}
|
|
3970
|
-
|
|
3971
|
-
init() {}
|
|
3972
3921
|
}
|
|
3973
3922
|
|
|
3974
3923
|
/**
|
|
@@ -4018,6 +3967,173 @@ class Code128Parameters extends joint.BaseJavaClass
|
|
|
4018
3967
|
}
|
|
4019
3968
|
}
|
|
4020
3969
|
|
|
3970
|
+
/**
|
|
3971
|
+
* <p>
|
|
3972
|
+
* Han Xin parameters.
|
|
3973
|
+
* </p>
|
|
3974
|
+
*/
|
|
3975
|
+
class HanXinParameters extends joint.BaseJavaClass
|
|
3976
|
+
{
|
|
3977
|
+
constructor(javaClass)
|
|
3978
|
+
{
|
|
3979
|
+
super(javaClass);
|
|
3980
|
+
this.init();
|
|
3981
|
+
}
|
|
3982
|
+
|
|
3983
|
+
init()
|
|
3984
|
+
{
|
|
3985
|
+
}
|
|
3986
|
+
|
|
3987
|
+
/**
|
|
3988
|
+
* <p>
|
|
3989
|
+
* Version of HanXin Code.
|
|
3990
|
+
* From Version01 to Version84 for Han Xin code.
|
|
3991
|
+
* Default value is HanXinVersion.Auto.
|
|
3992
|
+
* </p>
|
|
3993
|
+
*/
|
|
3994
|
+
getHanXinVersion()
|
|
3995
|
+
{
|
|
3996
|
+
return this.getJavaClass().getHanXinVersionSync();
|
|
3997
|
+
}
|
|
3998
|
+
|
|
3999
|
+
/**
|
|
4000
|
+
* <p>
|
|
4001
|
+
* Version of HanXin Code.
|
|
4002
|
+
* From Version01 to Version84 for Han Xin code.
|
|
4003
|
+
* Default value is HanXinVersion.Auto.
|
|
4004
|
+
* </p>
|
|
4005
|
+
*/
|
|
4006
|
+
setHanXinVersion(value)
|
|
4007
|
+
{
|
|
4008
|
+
this.getJavaClass().setHanXinVersionSync(value);
|
|
4009
|
+
}
|
|
4010
|
+
|
|
4011
|
+
/**
|
|
4012
|
+
* <p>
|
|
4013
|
+
* Level of Reed-Solomon error correction for Han Xin barcode.
|
|
4014
|
+
* From low to high: L1, L2, L3, L4. see HanXinErrorLevel.
|
|
4015
|
+
* </p>
|
|
4016
|
+
*/
|
|
4017
|
+
getHanXinErrorLevel()
|
|
4018
|
+
{
|
|
4019
|
+
return this.getJavaClass().getHanXinErrorLevelSync();
|
|
4020
|
+
}
|
|
4021
|
+
/**
|
|
4022
|
+
* <p>
|
|
4023
|
+
* Level of Reed-Solomon error correction for Han Xin barcode.
|
|
4024
|
+
* From low to high: L1, L2, L3, L4. see HanXinErrorLevel.
|
|
4025
|
+
* </p>
|
|
4026
|
+
*/
|
|
4027
|
+
setHanXinErrorLevel(value)
|
|
4028
|
+
{
|
|
4029
|
+
this.getJavaClass().setHanXinErrorLevelSync(value);
|
|
4030
|
+
}
|
|
4031
|
+
|
|
4032
|
+
/**
|
|
4033
|
+
* <p>
|
|
4034
|
+
* HanXin encoding mode.
|
|
4035
|
+
* Default value: HanXinEncodeMode.Mixed.
|
|
4036
|
+
* </p>
|
|
4037
|
+
*/
|
|
4038
|
+
getHanXinEncodeMode()
|
|
4039
|
+
{
|
|
4040
|
+
return this.getJavaClass().getHanXinEncodeModeSync();
|
|
4041
|
+
}
|
|
4042
|
+
/**
|
|
4043
|
+
* <p>
|
|
4044
|
+
* HanXin encoding mode.
|
|
4045
|
+
* Default value: HanXinEncodeMode.Mixed.
|
|
4046
|
+
* </p>
|
|
4047
|
+
*/
|
|
4048
|
+
setHanXinEncodeMode(value)
|
|
4049
|
+
{
|
|
4050
|
+
this.getJavaClass().setHanXinEncodeModeSync(value);
|
|
4051
|
+
}
|
|
4052
|
+
|
|
4053
|
+
/**
|
|
4054
|
+
* <p>
|
|
4055
|
+
* Extended Channel Interpretation Identifiers. It is used to tell the barcode reader details
|
|
4056
|
+
* about the used references for encoding the data in the symbol.
|
|
4057
|
+
* Current implementation consists all well known charset encodings.
|
|
4058
|
+
* </p>
|
|
4059
|
+
*/
|
|
4060
|
+
getHanXinECIEncoding()
|
|
4061
|
+
{
|
|
4062
|
+
return this.getJavaClass().getHanXinECIEncodingSync();
|
|
4063
|
+
}
|
|
4064
|
+
/**
|
|
4065
|
+
* <p>
|
|
4066
|
+
* Extended Channel Interpretation Identifiers. It is used to tell the barcode reader details
|
|
4067
|
+
* about the used references for encoding the data in the symbol.
|
|
4068
|
+
* Current implementation consists all well known charset encodings.
|
|
4069
|
+
* </p>
|
|
4070
|
+
*/
|
|
4071
|
+
setHanXinECIEncoding(value)
|
|
4072
|
+
{
|
|
4073
|
+
this.getJavaClass().setHanXinECIEncodingSync(value);
|
|
4074
|
+
}
|
|
4075
|
+
|
|
4076
|
+
|
|
4077
|
+
/**
|
|
4078
|
+
* <p>
|
|
4079
|
+
* Returns a human-readable string representation of this {@code HanXinParameters}.
|
|
4080
|
+
* </p>
|
|
4081
|
+
* @return A string that represents this {@code HanXinParameters}.
|
|
4082
|
+
*/
|
|
4083
|
+
toString()
|
|
4084
|
+
{
|
|
4085
|
+
return this.getJavaClass().toStringSync();
|
|
4086
|
+
}
|
|
4087
|
+
}
|
|
4088
|
+
|
|
4089
|
+
/**
|
|
4090
|
+
* Enable checksum validation during recognition for 1D barcodes.<br>
|
|
4091
|
+
* Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible.<br>
|
|
4092
|
+
* Checksum never used: Codabar<br>
|
|
4093
|
+
* Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN<br>
|
|
4094
|
+
* Checksum always used: Rest symbologies
|
|
4095
|
+
* @example
|
|
4096
|
+
* //This sample shows influence of ChecksumValidation on recognition quality and results
|
|
4097
|
+
* let generator = new BarcodeGenerator(EncodeTypes.EAN_13, "1234567890128");
|
|
4098
|
+
* generator.save("test.png", BarcodeImageFormat.PNG);
|
|
4099
|
+
* let reader = new BarCodeReader("test.png", DecodeType.EAN_13);
|
|
4100
|
+
* //checksum disabled
|
|
4101
|
+
* reader.setChecksumValidation(ChecksumValidation.OFF);
|
|
4102
|
+
* reader.readBarCodes().forEach(function(result, i, results)
|
|
4103
|
+
* {
|
|
4104
|
+
* console.log("BarCode CodeText: " + result.getCodeText());
|
|
4105
|
+
* console.log("BarCode Value: " + result.getExtended().getOneD().getValue());
|
|
4106
|
+
* console.log("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
|
|
4107
|
+
* });
|
|
4108
|
+
* let reader = new BarCodeReader("test.png", DecodeType.EAN_13);
|
|
4109
|
+
* //checksum enabled
|
|
4110
|
+
* reader.setChecksumValidation(ChecksumValidation.ON);
|
|
4111
|
+
* reader.readBarCodes().forEach(function(result, i, results)
|
|
4112
|
+
* {
|
|
4113
|
+
* console.log("BarCode CodeText: " + result.getCodeText());
|
|
4114
|
+
* console.log("BarCode Value: " + result.getExtended().getOneD().getValue());
|
|
4115
|
+
* console.log("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
|
|
4116
|
+
* });
|
|
4117
|
+
* @enum
|
|
4118
|
+
*/
|
|
4119
|
+
ChecksumValidation =
|
|
4120
|
+
{
|
|
4121
|
+
/**
|
|
4122
|
+
* If checksum is required by the specification - it will be validated.
|
|
4123
|
+
*/
|
|
4124
|
+
DEFAULT: 0,
|
|
4125
|
+
|
|
4126
|
+
/**
|
|
4127
|
+
* Always validate checksum if possible.
|
|
4128
|
+
*/
|
|
4129
|
+
ON: 1,
|
|
4130
|
+
|
|
4131
|
+
/**
|
|
4132
|
+
* Do not validate checksum.
|
|
4133
|
+
*/
|
|
4134
|
+
OFF: 2
|
|
4135
|
+
};
|
|
4136
|
+
|
|
4021
4137
|
/**
|
|
4022
4138
|
* BarcodeClassifications EncodeTypes classification
|
|
4023
4139
|
* @enum
|
|
@@ -4061,10 +4177,25 @@ BarcodeClassifications =
|
|
|
4061
4177
|
*/
|
|
4062
4178
|
FontStyle =
|
|
4063
4179
|
{
|
|
4180
|
+
/**
|
|
4181
|
+
* Bold text
|
|
4182
|
+
*/
|
|
4064
4183
|
BOLD: 1,
|
|
4184
|
+
/**
|
|
4185
|
+
* Italic text
|
|
4186
|
+
*/
|
|
4065
4187
|
ITALIC: 2,
|
|
4188
|
+
/**
|
|
4189
|
+
* Normal text
|
|
4190
|
+
*/
|
|
4066
4191
|
REGULAR: 0,
|
|
4192
|
+
/**
|
|
4193
|
+
* Text with a line through the middle.
|
|
4194
|
+
*/
|
|
4067
4195
|
STRIKEOUT: 8,
|
|
4196
|
+
/**
|
|
4197
|
+
* Underlined text.
|
|
4198
|
+
*/
|
|
4068
4199
|
UNDERLINE: 4
|
|
4069
4200
|
};
|
|
4070
4201
|
|
|
@@ -4139,10 +4270,10 @@ DataMatrixEncodeMode =
|
|
|
4139
4270
|
ANSIX12: 11,
|
|
4140
4271
|
|
|
4141
4272
|
/**
|
|
4142
|
-
* ExtendedCodetext mode allows to manually switch encodation schemes in codetext
|
|
4143
|
-
* Allowed encodation schemes are: EDIFACT, ANSIX12, ASCII, C40, Text, Auto
|
|
4144
|
-
* Extended codetext example: @"\ansix12:ANSIX12TEXT\ascii:backslash must be \\ doubled\edifact:EdifactEncodedText"
|
|
4145
|
-
* All backslashes (\) must be doubled in text
|
|
4273
|
+
* ExtendedCodetext mode allows to manually switch encodation schemes in codetext.<br>
|
|
4274
|
+
* Allowed encodation schemes are: EDIFACT, ANSIX12, ASCII, C40, Text, Auto.<br>
|
|
4275
|
+
* Extended codetext example: @"\ansix12:ANSIX12TEXT\ascii:backslash must be \\ doubled\edifact:EdifactEncodedText"<br>
|
|
4276
|
+
* All backslashes (\) must be doubled in text.<br>
|
|
4146
4277
|
*
|
|
4147
4278
|
* @example
|
|
4148
4279
|
* //This sample shows how to do codetext in Extended Mode.
|
|
@@ -4216,26 +4347,26 @@ ITF14BorderType =
|
|
|
4216
4347
|
/**
|
|
4217
4348
|
* 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.
|
|
4218
4349
|
* @example
|
|
4219
|
-
*
|
|
4220
|
-
*
|
|
4221
|
-
*
|
|
4222
|
-
*
|
|
4223
|
-
*
|
|
4224
|
-
*
|
|
4225
|
-
*
|
|
4350
|
+
* //Example how to use ECI encoding
|
|
4351
|
+
* let generator = new BarcodeGenerator(EncodeTypes.QR);
|
|
4352
|
+
* generator.setCodeText("12345TEXT");
|
|
4353
|
+
* generator.getParameters().getBarcode().getQR().setQrEncodeMode(QREncodeMode.ECI_ENCODING);
|
|
4354
|
+
* generator.getParameters().getBarcode().getQR().setQrEncodeType(QREncodeType.FORCE_QR);
|
|
4355
|
+
* generator.getParameters().getBarcode().getQR().setQrECIEncoding(ECIEncodings.UTF8);
|
|
4356
|
+
* generator.save("test.png", BarcodeImageFormat.PNG);
|
|
4226
4357
|
*
|
|
4227
4358
|
* @example
|
|
4228
|
-
*
|
|
4229
|
-
*
|
|
4230
|
-
*
|
|
4231
|
-
*
|
|
4232
|
-
*
|
|
4233
|
-
*
|
|
4234
|
-
*
|
|
4235
|
-
*
|
|
4236
|
-
*
|
|
4237
|
-
*
|
|
4238
|
-
*
|
|
4359
|
+
* //Example how to use FNC1 first position in Extended Mode
|
|
4360
|
+
* QrExtCodetextBuilder textBuilder = new QrExtCodetextBuilder();
|
|
4361
|
+
* textBuilder.addPlainCodetext("000%89%%0");
|
|
4362
|
+
* textBuilder.addFNC1GroupSeparator();
|
|
4363
|
+
* textBuilder.addPlainCodetext("12345<FNC1>");
|
|
4364
|
+
* //generate barcode
|
|
4365
|
+
* let generator = new BarcodeGenerator(EncodeTypes.QR);
|
|
4366
|
+
* generator.setCodeText(textBuilder.getExtendedCodetext());
|
|
4367
|
+
* generator.getParameters().getBarcode().getQR().setQrEncodeMode(QREncodeMode.EXTENDED_CODETEXT);
|
|
4368
|
+
* generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text");
|
|
4369
|
+
* generator.save("d:/test.png", BarcodeImageFormat.PNG);
|
|
4239
4370
|
*
|
|
4240
4371
|
* @example
|
|
4241
4372
|
* // This sample shows how to use FNC1 second position in Extended Mode.
|
|
@@ -4293,20 +4424,18 @@ QREncodeMode =
|
|
|
4293
4424
|
ECI_ENCODING: 4,
|
|
4294
4425
|
|
|
4295
4426
|
/**
|
|
4296
|
-
*
|
|
4297
|
-
*
|
|
4298
|
-
*
|
|
4299
|
-
*
|
|
4300
|
-
*
|
|
4301
|
-
*
|
|
4302
|
-
*
|
|
4303
|
-
*
|
|
4304
|
-
*
|
|
4305
|
-
*
|
|
4306
|
-
*
|
|
4307
|
-
*
|
|
4308
|
-
* <p>All unicode characters after ECI identifier are automatically encoded into correct character codeset.</p>
|
|
4309
|
-
* </p>
|
|
4427
|
+
* Extended Channel mode which supports FNC1 first position, FNC1 second position and multi ECI modes.<br>
|
|
4428
|
+
* It is better to use QrExtCodetextBuilder for extended codetext generation.<br>
|
|
4429
|
+
* Use Display2DText property to set visible text to removing managing characters.<br>
|
|
4430
|
+
* Encoding Principles:<br>
|
|
4431
|
+
* All symbols "\" must be doubled "\\" in the codetext.<br>
|
|
4432
|
+
* FNC1 in first position is set in codetext as as "<FNC1>"<br>
|
|
4433
|
+
* FNC1 in second position is set in codetext as as "<FNC1(value)>". The value must be single symbols (a-z, A-Z) or digits from 0 to 99.<br>
|
|
4434
|
+
* Group Separator for FNC1 modes is set as 0x1D character '\\u001D' <br>
|
|
4435
|
+
* If you need to insert "<FNC1>" string into barcode write it as "<\FNC1>" <br>
|
|
4436
|
+
* ECI identifiers are set as single slash and six digits identifier "\000026" - UTF8 ECI identifier<br>
|
|
4437
|
+
* TO disable current ECI mode and convert to default JIS8 mode zero mode ECI indetifier is set. "\000000"<br>
|
|
4438
|
+
* All unicode characters after ECI identifier are automatically encoded into correct character codeset.<br>
|
|
4310
4439
|
*/
|
|
4311
4440
|
EXTENDED_CODETEXT: 5
|
|
4312
4441
|
|
|
@@ -4357,7 +4486,7 @@ DataMatrixEccType =
|
|
|
4357
4486
|
QRVersion =
|
|
4358
4487
|
{
|
|
4359
4488
|
/**
|
|
4360
|
-
* Specifies to automatically pick up the best version for QR
|
|
4489
|
+
* Specifies to automatically pick up the best version for QR.<br>
|
|
4361
4490
|
* This is default value.
|
|
4362
4491
|
*/
|
|
4363
4492
|
AUTO: 0,
|
|
@@ -4597,23 +4726,23 @@ QRVersion =
|
|
|
4597
4726
|
AztecSymbolMode =
|
|
4598
4727
|
{
|
|
4599
4728
|
/**
|
|
4600
|
-
* Specifies to automatically pick up the best symbol (COMPACT or FULL-range) for Aztec
|
|
4729
|
+
* Specifies to automatically pick up the best symbol (COMPACT or FULL-range) for Aztec.<br>
|
|
4601
4730
|
* This is default value.
|
|
4602
4731
|
* @enum
|
|
4603
4732
|
*/
|
|
4604
4733
|
AUTO: 0,
|
|
4605
4734
|
/**
|
|
4606
|
-
* Specifies the COMPACT symbol for Aztec
|
|
4735
|
+
* Specifies the COMPACT symbol for Aztec.<br>
|
|
4607
4736
|
* Aztec COMPACT symbol permits only 1, 2, 3 or 4 layers.
|
|
4608
4737
|
*/
|
|
4609
4738
|
COMPACT: 1,
|
|
4610
4739
|
/**
|
|
4611
|
-
* Specifies the FULL-range symbol for Aztec
|
|
4740
|
+
* Specifies the FULL-range symbol for Aztec.<br>
|
|
4612
4741
|
* Aztec FULL-range symbol permits from 1 to 32 layers.
|
|
4613
4742
|
*/
|
|
4614
4743
|
FULL_RANGE: 2,
|
|
4615
4744
|
/**
|
|
4616
|
-
* Specifies the RUNE symbol for Aztec
|
|
4745
|
+
* Specifies the RUNE symbol for Aztec.<br>
|
|
4617
4746
|
* Aztec Runes are a series of small but distinct machine-readable marks. It permits only number value from 0 to 255.
|
|
4618
4747
|
*/
|
|
4619
4748
|
RUNE: 3
|
|
@@ -4715,7 +4844,7 @@ QRErrorLevel =
|
|
|
4715
4844
|
|
|
4716
4845
|
|
|
4717
4846
|
/**
|
|
4718
|
-
* QR / MicroQR selector mode. Select FORCE_QR for standard QR symbols, AUTO for MicroQR
|
|
4847
|
+
* QR / MicroQR selector mode. Select FORCE_QR for standard QR symbols, AUTO for MicroQR.<br>
|
|
4719
4848
|
* FORCE_MICRO_QR is used for strongly MicroQR symbol generation if it is possible.
|
|
4720
4849
|
* @enum
|
|
4721
4850
|
*/
|
|
@@ -4836,18 +4965,20 @@ AutoSizeMode =
|
|
|
4836
4965
|
NONE: 0, //or CUSTOM, or DEFAULT
|
|
4837
4966
|
|
|
4838
4967
|
/**
|
|
4839
|
-
* Barcode resizes to nearest lowest possible size
|
|
4968
|
+
* Barcode resizes to nearest lowest possible size<br>
|
|
4840
4969
|
* which are specified by BarCodeWidth and BarCodeHeight properties.
|
|
4841
4970
|
*/
|
|
4842
4971
|
NEAREST: 1,
|
|
4843
4972
|
|
|
4844
4973
|
/**
|
|
4845
|
-
* Resizes barcode to specified size with little scaling
|
|
4846
|
-
* but it can be little damaged in some cases
|
|
4847
|
-
* because using interpolation for scaling
|
|
4848
|
-
* Size can be specified by BarcodeGenerator.BarCodeWidth
|
|
4849
|
-
* and BarcodeGenerator.BarCodeHeight properties
|
|
4974
|
+
* Resizes barcode to specified size with little scaling<br>
|
|
4975
|
+
* but it can be little damaged in some cases<br>
|
|
4976
|
+
* because using interpolation for scaling.<br>
|
|
4977
|
+
* Size can be specified by BarcodeGenerator.BarCodeWidth<br>
|
|
4978
|
+
* and BarcodeGenerator.BarCodeHeight properties.<br>
|
|
4979
|
+
* @example
|
|
4850
4980
|
* This sample shows how to create and save a BarCode image in Scale mode.
|
|
4981
|
+
*
|
|
4851
4982
|
* let generator = new BarcodeGenerator( EncodeTypes.DATA_MATRIX);
|
|
4852
4983
|
* generator.getParameters().getBarcode().setAutoSizeMode(AutoSizeMode.INTERPOLATION);
|
|
4853
4984
|
* generator.getParameters().getBarcode().getBarCodeWidth().setMillimeters(50);
|
|
@@ -5047,7 +5178,7 @@ EncodeTypes =
|
|
|
5047
5178
|
VIN: 26,
|
|
5048
5179
|
|
|
5049
5180
|
/**
|
|
5050
|
-
* Represents Deutsch Post barcode, This EncodeType is also known as Identcode,CodeIdentcode,German Postal 2 of 5 Identcode
|
|
5181
|
+
* Represents Deutsch Post barcode, This EncodeType is also known as Identcode,CodeIdentcode,German Postal 2 of 5 Identcode,<br>
|
|
5051
5182
|
* Deutsch Post AG Identcode, Deutsch Frachtpost Identcode, Deutsch Post AG (DHL)
|
|
5052
5183
|
*/
|
|
5053
5184
|
DEUTSCHE_POST_IDENTCODE: 27,
|
|
@@ -5228,7 +5359,8 @@ EncodeTypes =
|
|
|
5228
5359
|
DUTCH_KIX: 61,
|
|
5229
5360
|
|
|
5230
5361
|
/**
|
|
5231
|
-
* Specifies that the data should be encoded with UPC coupon with GS1-128 Extended Code barcode specification
|
|
5362
|
+
* Specifies that the data should be encoded with UPC coupon with GS1-128 Extended Code barcode specification.<br>
|
|
5363
|
+
* @example
|
|
5232
5364
|
* An example of the input string:
|
|
5233
5365
|
* BarCodeGenerator.setCodetext("514141100906(8102)03"),
|
|
5234
5366
|
* where UPCA part is "514141100906", GS1Code128 part is (8102)03.
|
|
@@ -5236,7 +5368,8 @@ EncodeTypes =
|
|
|
5236
5368
|
UPCA_GS_1_CODE_128_COUPON: 62,
|
|
5237
5369
|
|
|
5238
5370
|
/**
|
|
5239
|
-
* Specifies that the data should be encoded with UPC coupon with GS1 DataBar addition barcode specification
|
|
5371
|
+
* Specifies that the data should be encoded with UPC coupon with GS1 DataBar addition barcode specification.<br>
|
|
5372
|
+
* @example
|
|
5240
5373
|
* An example of the input string:
|
|
5241
5374
|
* BarCodeGenerator.setCodetext("514141100906(8110)106141416543213500110000310123196000"),
|
|
5242
5375
|
* where UPCA part is "514141100906, DATABAR part is "(8110)106141416543213500110000310123196000".
|
|
@@ -5336,9 +5469,19 @@ EncodeTypes =
|
|
|
5336
5469
|
*/
|
|
5337
5470
|
GS_1_DOT_CODE: 78,
|
|
5338
5471
|
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5472
|
+
/**
|
|
5473
|
+
* Specifies that the data should be encoded with <b>Han Xin</b> barcode specification
|
|
5474
|
+
*/
|
|
5475
|
+
HAN_XIN: 79,
|
|
5476
|
+
|
|
5477
|
+
/**
|
|
5478
|
+
* 2D barcode symbology QR with GS1 string format
|
|
5479
|
+
*/
|
|
5480
|
+
GS_1_HAN_XIN: 80,
|
|
5481
|
+
|
|
5482
|
+
parse(encodeTypeName)
|
|
5483
|
+
{
|
|
5484
|
+
if(encodeTypeName == "CODABAR") return 0;
|
|
5342
5485
|
|
|
5343
5486
|
else if(encodeTypeName == "CODE_11") return 1;
|
|
5344
5487
|
|
|
@@ -5496,15 +5639,28 @@ EncodeTypes =
|
|
|
5496
5639
|
|
|
5497
5640
|
else if(encodeTypeName == "GS_1_DOT_CODE") return 78;
|
|
5498
5641
|
|
|
5642
|
+
else if(encodeTypeName == "HAN_XIN") return 79;
|
|
5643
|
+
|
|
5644
|
+
else if(encodeTypeName == "GS_1_HAN_XIN") return 80;
|
|
5645
|
+
|
|
5499
5646
|
else return -1;
|
|
5500
5647
|
}
|
|
5501
5648
|
}
|
|
5502
5649
|
|
|
5503
5650
|
/**
|
|
5504
|
-
* Macro Characters 05 and 06 values are used to obtain more compact encoding in special modes
|
|
5505
|
-
* 05 Macro craracter is translated to "[)>\u001E05\u001D" as decoded data header and "\u001E\u0004" as decoded data trailer
|
|
5506
|
-
* 06 Macro craracter is translated to "[)>\u001E06\u001D" as decoded data header and "\u001E\u0004" as decoded data trailer.
|
|
5507
|
-
*
|
|
5651
|
+
* Macro Characters 05 and 06 values are used to obtain more compact encoding in special modes.<br>
|
|
5652
|
+
* 05 Macro craracter is translated to "[)>\u001E05\u001D" as decoded data header and "\u001E\u0004" as decoded data trailer.<br>
|
|
5653
|
+
* 06 Macro craracter is translated to "[)>\u001E06\u001D" as decoded data header and "\u001E\u0004" as decoded data trailer.
|
|
5654
|
+
*
|
|
5655
|
+
* \code
|
|
5656
|
+
* //to generate autoidentified GS1 message like this "(10)123ABC(10)123ABC" in ISO 15434 format you need:
|
|
5657
|
+
* BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.DATA_MATRIX, "10123ABC\u001D10123ABC");
|
|
5658
|
+
* generator.getParameters().getBarcode().getDataMatrix().setMacroCharacters(MacroCharacter.MACRO_05);
|
|
5659
|
+
* BarCodeReader reader = new BarCodeReader(generator.generateBarCodeImage(), DecodeType.GS_1_DATA_MATRIX);
|
|
5660
|
+
* for(BarCodeResult result : reader.readBarCodes())
|
|
5661
|
+
* System.out.println("BarCode CodeText: " + result.getCodeText());
|
|
5662
|
+
* \endcode
|
|
5663
|
+
* @enum
|
|
5508
5664
|
*/
|
|
5509
5665
|
MacroCharacter =
|
|
5510
5666
|
{
|
|
@@ -5514,10 +5670,11 @@ MacroCharacter =
|
|
|
5514
5670
|
NONE: 0,
|
|
5515
5671
|
|
|
5516
5672
|
/**
|
|
5517
|
-
* 05 Macro craracter is added to barcode data in first position
|
|
5518
|
-
* GS1 Data Identifier ISO 15434
|
|
5673
|
+
* 05 Macro craracter is added to barcode data in first position.<br>
|
|
5674
|
+
* GS1 Data Identifier ISO 15434<br>
|
|
5519
5675
|
* Character is translated to "[)>\u001E05\u001D" as decoded data header and "\u001E\u0004" as decoded data trailer.
|
|
5520
5676
|
*
|
|
5677
|
+
* @example
|
|
5521
5678
|
* //to generate autoidentified GS1 message like this "(10)123ABC(10)123ABC" in ISO 15434 format you need:
|
|
5522
5679
|
* let generator = new BarcodeGenerator(EncodeTypes.DATA_MATRIX, "10123ABC\u001D10123ABC");
|
|
5523
5680
|
* generator.getParameters().getBarcode().getDataMatrix().setMacroCharacters(MacroCharacter.MACRO_05);
|
|
@@ -5530,8 +5687,8 @@ MacroCharacter =
|
|
|
5530
5687
|
MACRO_05: 5,
|
|
5531
5688
|
|
|
5532
5689
|
/**
|
|
5533
|
-
* 06 Macro craracter is added to barcode data in first position
|
|
5534
|
-
* ASC MH10 Data Identifier ISO 15434
|
|
5690
|
+
* 06 Macro craracter is added to barcode data in first position.<br>
|
|
5691
|
+
* ASC MH10 Data Identifier ISO 15434<br>
|
|
5535
5692
|
* Character is translated to "[)>\u001E06\u001D" as decoded data header and "\u001E\u0004" as decoded data trailer.
|
|
5536
5693
|
*/
|
|
5537
5694
|
MACRO_06: 6
|
|
@@ -5570,10 +5727,11 @@ PatchFormat =
|
|
|
5570
5727
|
};
|
|
5571
5728
|
|
|
5572
5729
|
/**
|
|
5573
|
-
* Extended Channel Interpretation Identifiers. It is used to tell the barcode reader details
|
|
5574
|
-
* about the used references for encoding the data in the symbol
|
|
5575
|
-
* Current implementation consists all well known charset encodings
|
|
5730
|
+
* Extended Channel Interpretation Identifiers. It is used to tell the barcode reader details<br>
|
|
5731
|
+
* about the used references for encoding the data in the symbol.<br>
|
|
5732
|
+
* Current implementation consists all well known charset encodings.<br>
|
|
5576
5733
|
* Currently, it is used only for QR 2D barcode.
|
|
5734
|
+
*
|
|
5577
5735
|
* @example
|
|
5578
5736
|
* let generator = new BarcodeGenerator(EncodeTypes.QR);
|
|
5579
5737
|
* generator.setCodeText("12345TEXT");
|
|
@@ -5808,6 +5966,7 @@ BarCodeImageFormat =
|
|
|
5808
5966
|
SVG: 7
|
|
5809
5967
|
};
|
|
5810
5968
|
|
|
5969
|
+
|
|
5811
5970
|
/**
|
|
5812
5971
|
* Type of 2D component
|
|
5813
5972
|
* This sample shows how to create and save a GS1 Composite Bar image.
|
|
@@ -5861,7 +6020,7 @@ TwoDComponentType =
|
|
|
5861
6020
|
Pdf417MacroTerminator =
|
|
5862
6021
|
{
|
|
5863
6022
|
/**
|
|
5864
|
-
* The terminator will be added automatically if the number of segments is provided
|
|
6023
|
+
* The terminator will be added automatically if the number of segments is provided<br>
|
|
5865
6024
|
* and the current segment is the last one. In other cases, the terminator will not be added.
|
|
5866
6025
|
*/
|
|
5867
6026
|
AUTO: 0,
|
|
@@ -5885,11 +6044,10 @@ Pdf417MacroTerminator =
|
|
|
5885
6044
|
* //Auto mode
|
|
5886
6045
|
* let codetext = "犬Right狗";
|
|
5887
6046
|
* let generator = new BarcodeGenerator(EncodeTypes.MAXI_CODE, codetext));
|
|
5888
|
-
*
|
|
5889
|
-
*
|
|
5890
|
-
* generator.save("test.bmp", BarcodeImageFormat.BMP);
|
|
5891
|
-
* }
|
|
6047
|
+
* generator.getParameters().getBarcode().getMaxiCode().setECIEncoding(ECIEncodings.UTF8);
|
|
6048
|
+
* generator.save("test.bmp", BarcodeImageFormat.BMP);
|
|
5892
6049
|
*
|
|
6050
|
+
* @example
|
|
5893
6051
|
* //Bytes mode
|
|
5894
6052
|
* let encodedArr = [ 0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9 ];
|
|
5895
6053
|
*
|
|
@@ -5901,10 +6059,11 @@ Pdf417MacroTerminator =
|
|
|
5901
6059
|
* });
|
|
5902
6060
|
* let codetext = strBld;
|
|
5903
6061
|
*
|
|
5904
|
-
* let
|
|
6062
|
+
* let generator = new BarcodeGenerator(EncodeTypes.MAXI_CODE, codetext))
|
|
5905
6063
|
* generator.getParameters().getBarcode().getMaxiCode().setMaxiCodeEncodeMode(MaxiCodeEncodeMode.BYTES);
|
|
5906
6064
|
* generator.save("test.bmp", BarcodeImageFormat.BMP);
|
|
5907
6065
|
*
|
|
6066
|
+
* @example
|
|
5908
6067
|
* //Extended codetext mode
|
|
5909
6068
|
* //create codetext
|
|
5910
6069
|
* let textBuilder = new MaxiCodeExtCodetextBuilder();
|
|
@@ -5923,33 +6082,33 @@ Pdf417MacroTerminator =
|
|
|
5923
6082
|
* generator.save("test.bmp", BarcodeImageFormat.BMP);
|
|
5924
6083
|
*/
|
|
5925
6084
|
MaxiCodeEncodeMode =
|
|
5926
|
-
{
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
}
|
|
6085
|
+
{
|
|
6086
|
+
|
|
6087
|
+
/**
|
|
6088
|
+
* Encode codetext with value set in the ECIEncoding property.
|
|
6089
|
+
*/
|
|
6090
|
+
AUTO: 0,
|
|
6091
|
+
|
|
6092
|
+
/**
|
|
6093
|
+
* Encode codetext as plain bytes. If it detects any Unicode character, the character will be encoded as two bytes, lower byte first.
|
|
6094
|
+
*/
|
|
6095
|
+
BYTES: 1,
|
|
6096
|
+
|
|
6097
|
+
/**
|
|
6098
|
+
* Extended mode which supports multi ECI modes.<br>
|
|
6099
|
+
* It is better to use MaxiCodeExtCodetextBuilder for extended codetext generation.<br>
|
|
6100
|
+
* Use Display2DText property to set visible text to removing managing characters.<br>
|
|
6101
|
+
* ECI identifiers are set as single slash and six digits identifier "\000026" - UTF8 ECI identifier<br>
|
|
6102
|
+
* All unicode characters after ECI identifier are automatically encoded into correct character codeset.
|
|
6103
|
+
*/
|
|
6104
|
+
EXTENDED_CODETEXT: 2
|
|
6105
|
+
}
|
|
5947
6106
|
|
|
5948
6107
|
/**
|
|
5949
|
-
* Encoding mode for MaxiCode barcodes
|
|
6108
|
+
* Encoding mode for MaxiCode barcodes.<br>
|
|
5950
6109
|
*
|
|
5951
|
-
* This sample shows how to genereate MaxiCode barcodes using ComplexBarcodeGenerator
|
|
5952
6110
|
* @example
|
|
6111
|
+
* This sample shows how to genereate MaxiCode barcodes using ComplexBarcodeGenerator
|
|
5953
6112
|
* //Mode 2 with standart second message
|
|
5954
6113
|
* let maxiCodeCodetext = new MaxiCodeCodetextMode2();
|
|
5955
6114
|
* maxiCodeCodetext.setPostalCode("524032140");
|
|
@@ -5961,6 +6120,7 @@ MaxiCodeEncodeMode =
|
|
|
5961
6120
|
* let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext);
|
|
5962
6121
|
* complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
|
|
5963
6122
|
*
|
|
6123
|
+
* @example
|
|
5964
6124
|
* //Mode 2 with structured second message
|
|
5965
6125
|
* let maxiCodeCodetext = new MaxiCodeCodetextMode2();
|
|
5966
6126
|
* maxiCodeCodetext.setPostalCode("524032140");
|
|
@@ -5975,6 +6135,7 @@ MaxiCodeEncodeMode =
|
|
|
5975
6135
|
* let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext);
|
|
5976
6136
|
* complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
|
|
5977
6137
|
*
|
|
6138
|
+
* @example
|
|
5978
6139
|
* //Mode 3 with standart second message
|
|
5979
6140
|
* let maxiCodeCodetext = new MaxiCodeCodetextMode3();
|
|
5980
6141
|
* maxiCodeCodetext.setPostalCode("B1050");
|
|
@@ -5986,6 +6147,7 @@ MaxiCodeEncodeMode =
|
|
|
5986
6147
|
* let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext);
|
|
5987
6148
|
* complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
|
|
5988
6149
|
*
|
|
6150
|
+
* @example
|
|
5989
6151
|
* //Mode 3 with structured second message
|
|
5990
6152
|
* let maxiCodeCodetext = new MaxiCodeCodetextMode3();
|
|
5991
6153
|
* maxiCodeCodetext.setPostalCode("B1050");
|
|
@@ -6000,6 +6162,7 @@ MaxiCodeEncodeMode =
|
|
|
6000
6162
|
* let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext.getConstructedCodetext();
|
|
6001
6163
|
* complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
|
|
6002
6164
|
*
|
|
6165
|
+
* @example
|
|
6003
6166
|
* //Mode 4
|
|
6004
6167
|
* let maxiCodeCodetext = new MaxiCodeStandardCodetext();
|
|
6005
6168
|
* maxiCodeCodetext.setMode(MaxiCodeMode.MODE_4);
|
|
@@ -6007,6 +6170,7 @@ MaxiCodeEncodeMode =
|
|
|
6007
6170
|
* let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext.getConstructedCodetext();
|
|
6008
6171
|
* complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
|
|
6009
6172
|
*
|
|
6173
|
+
* @example
|
|
6010
6174
|
* //Mode 5
|
|
6011
6175
|
* let maxiCodeCodetext = new MaxiCodeStandardCodetext();
|
|
6012
6176
|
* maxiCodeCodetext.setMode(MaxiCodeMode.MODE_5);
|
|
@@ -6014,6 +6178,7 @@ MaxiCodeEncodeMode =
|
|
|
6014
6178
|
* let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext.getConstructedCodetext())
|
|
6015
6179
|
* complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
|
|
6016
6180
|
*
|
|
6181
|
+
* @example
|
|
6017
6182
|
* //Mode 6
|
|
6018
6183
|
* let maxiCodeCodetext = new MaxiCodeStandardCodetext();
|
|
6019
6184
|
* maxiCodeCodetext.setMode(MaxiCodeMode.MODE_6);
|
|
@@ -6022,68 +6187,69 @@ MaxiCodeEncodeMode =
|
|
|
6022
6187
|
* complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);
|
|
6023
6188
|
*/
|
|
6024
6189
|
MaxiCodeMode =
|
|
6025
|
-
{
|
|
6026
|
-
|
|
6027
|
-
/**
|
|
6028
|
-
* Mode 2 encodes postal information in first message and data in second message.
|
|
6029
|
-
* Has 9 digits postal code (used only in USA).
|
|
6030
|
-
*/
|
|
6031
|
-
MODE_2: 2,
|
|
6032
|
-
|
|
6033
|
-
/**
|
|
6034
|
-
* Mode 3 encodes postal information in first message and data in second message.
|
|
6035
|
-
* Has 6 alphanumeric postal code, used in the world.
|
|
6036
|
-
*/
|
|
6037
|
-
MODE_3: 3,
|
|
6190
|
+
{
|
|
6038
6191
|
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6192
|
+
/**
|
|
6193
|
+
* Mode 2 encodes postal information in first message and data in second message.<br>
|
|
6194
|
+
* Has 9 digits postal code (used only in USA).
|
|
6195
|
+
*/
|
|
6196
|
+
MODE_2: 2,
|
|
6043
6197
|
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6198
|
+
/**
|
|
6199
|
+
* Mode 3 encodes postal information in first message and data in second message.<br>
|
|
6200
|
+
* Has 6 alphanumeric postal code, used in the world.
|
|
6201
|
+
*/
|
|
6202
|
+
MODE_3: 3,
|
|
6048
6203
|
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6204
|
+
/**
|
|
6205
|
+
* Mode 4 encodes data in first and second message, with short ECC correction.<br>
|
|
6206
|
+
*/
|
|
6207
|
+
MODE_4: 4,
|
|
6208
|
+
|
|
6209
|
+
/**
|
|
6210
|
+
* Mode 5 encodes data in first and second message, with long ECC correction.
|
|
6211
|
+
*/
|
|
6212
|
+
MODE_5: 5,
|
|
6213
|
+
|
|
6214
|
+
/**
|
|
6215
|
+
* Mode 6 encodes data in first and second message, with short ECC correction.<br>
|
|
6216
|
+
* Used to encode device.
|
|
6217
|
+
*/
|
|
6218
|
+
MODE_6: 6
|
|
6219
|
+
}
|
|
6055
6220
|
|
|
6056
6221
|
/**
|
|
6057
|
-
* <p>
|
|
6058
6222
|
* Encoding mode for DotCode barcodes.
|
|
6059
|
-
*
|
|
6060
|
-
*
|
|
6223
|
+
*
|
|
6224
|
+
* @example
|
|
6061
6225
|
* //Auto mode with macros
|
|
6062
6226
|
* let codetext = ""[)>\u001E05\u001DCodetextWithMacros05\u001E\u0004"";
|
|
6063
6227
|
* let generator = new BarcodeGenerator(EncodeTypes.DOT_CODE, codetext);
|
|
6064
|
-
*
|
|
6065
|
-
* generator.save("test.bmp", BarCodeImageFormat.BMP);
|
|
6066
|
-
* }
|
|
6228
|
+
* generator.save("test.bmp", BarCodeImageFormat.BMP);
|
|
6067
6229
|
*
|
|
6230
|
+
* @example
|
|
6068
6231
|
* //Auto mode
|
|
6069
6232
|
* let codetext = "犬Right狗";
|
|
6070
6233
|
* let generator = new BarcodeGenerator(EncodeTypes.DOT_CODE, codetext);
|
|
6071
|
-
*
|
|
6072
|
-
*
|
|
6073
|
-
* generator.save("test.bmp", BarCodeImageFormat.BMP);
|
|
6074
|
-
* }
|
|
6234
|
+
* generator.getParameters().getBarcode().getDotCode().setECIEncoding(ECIEncodings.UTF8);
|
|
6235
|
+
* generator.save("test.bmp", BarCodeImageFormat.BMP);
|
|
6075
6236
|
*
|
|
6237
|
+
* @example
|
|
6076
6238
|
* //Bytes mode
|
|
6077
6239
|
* let encodedArr = array( 0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9 );
|
|
6078
6240
|
* //encode array to string
|
|
6079
6241
|
* let codetext = "";
|
|
6080
6242
|
* encodedArr.forEach(function(bval, i, bvals)
|
|
6243
|
+
* {
|
|
6081
6244
|
* codetext += bval;
|
|
6245
|
+
* });
|
|
6246
|
+
*
|
|
6247
|
+
* @example
|
|
6082
6248
|
* let generator = new BarcodeGenerator(EncodeTypes.DOT_CODE, codetext);
|
|
6083
|
-
*
|
|
6084
|
-
*
|
|
6085
|
-
*
|
|
6086
|
-
*
|
|
6249
|
+
* generator.getParameters().getBarcode().getDotCode().setDotCodeEncodeMode(DotCodeEncodeMode.BYTES);
|
|
6250
|
+
* generator.save("test.bmp", BarCodeImageFormat.BMP);
|
|
6251
|
+
*
|
|
6252
|
+
* @example
|
|
6087
6253
|
* //Extended codetext mode
|
|
6088
6254
|
* //create codetext
|
|
6089
6255
|
* let textBuilder = new DotCodeExtCodetextBuilder();
|
|
@@ -6099,40 +6265,34 @@ MaxiCodeMode =
|
|
|
6099
6265
|
* let codetext = textBuilder.getExtendedCodetext();
|
|
6100
6266
|
* //generate
|
|
6101
6267
|
* let generator = new BarcodeGenerator(EncodeTypes.DOT_CODE, codetext);
|
|
6102
|
-
*
|
|
6103
|
-
*
|
|
6104
|
-
* generator.save("test.bmp", BarCodeImageFormat.BMP);
|
|
6105
|
-
* }
|
|
6106
|
-
* </pre>
|
|
6107
|
-
* </pre></blockquote></hr></p>
|
|
6268
|
+
* generator.getParameters().getBarcode().getDotCode().setDotCodeEncodeMode(DotCodeEncodeMode.EXTENDED_CODETEXT);
|
|
6269
|
+
* generator.save("test.bmp", BarCodeImageFormat.BMP);
|
|
6108
6270
|
*/
|
|
6109
6271
|
DotCodeEncodeMode =
|
|
6110
|
-
{
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6272
|
+
{
|
|
6273
|
+
/**
|
|
6274
|
+
* <p>
|
|
6275
|
+
* Encode codetext with value set in the ECIEncoding property.
|
|
6276
|
+
* </p>
|
|
6277
|
+
*/
|
|
6278
|
+
AUTO: 0,
|
|
6117
6279
|
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6280
|
+
/**
|
|
6281
|
+
* <p>
|
|
6282
|
+
* Encode codetext as plain bytes. If it detects any Unicode character, the character will be encoded as two bytes, lower byte first.
|
|
6283
|
+
* </p>
|
|
6284
|
+
*/
|
|
6285
|
+
BYTES: 1,
|
|
6124
6286
|
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
EXTENDED_CODETEXT: 2
|
|
6135
|
-
}
|
|
6287
|
+
/**
|
|
6288
|
+
* <p>Extended mode which supports multi ECI modes.</p>
|
|
6289
|
+
* <p>It is better to use DotCodeExtCodetextBuilder for extended codetext generation.</p>
|
|
6290
|
+
* <p>Use Display2DText property to set visible text to removing managing characters.</p>
|
|
6291
|
+
* <p>ECI identifiers are set as single slash and six digits identifier "\000026" - UTF8 ECI identifier</p>
|
|
6292
|
+
* <p>All unicode characters after ECI identifier are automatically encoded into correct character codeset.</p>
|
|
6293
|
+
*/
|
|
6294
|
+
EXTENDED_CODETEXT: 2
|
|
6295
|
+
}
|
|
6136
6296
|
|
|
6137
6297
|
|
|
6138
6298
|
/**
|
|
@@ -6142,7 +6302,7 @@ DotCodeEncodeMode =
|
|
|
6142
6302
|
* </p><p><hr><blockquote><pre>
|
|
6143
6303
|
* Thos code demonstrates how to generate code 128 with different encodings
|
|
6144
6304
|
* <pre>
|
|
6145
|
-
*
|
|
6305
|
+
*
|
|
6146
6306
|
* //Generate code 128 with ISO 15417 encoding
|
|
6147
6307
|
*
|
|
6148
6308
|
* let generator = new BarcodeGenerator(EncodeTypes.CODE_128, "ABCD1234567890");
|
|
@@ -6157,55 +6317,697 @@ DotCodeEncodeMode =
|
|
|
6157
6317
|
* </pre></blockquote></hr></p>
|
|
6158
6318
|
*/
|
|
6159
6319
|
Code128EncodeMode =
|
|
6320
|
+
{
|
|
6321
|
+
/**
|
|
6322
|
+
* <p>
|
|
6323
|
+
* Encode codetext in classic ISO 15417 mode. The mode should be used in all ordinary cases.
|
|
6324
|
+
* </p>
|
|
6325
|
+
*/
|
|
6326
|
+
AUTO: 0,
|
|
6327
|
+
|
|
6328
|
+
/**
|
|
6329
|
+
* <p>
|
|
6330
|
+
* Encode codetext only in 128A codeset.
|
|
6331
|
+
* </p>
|
|
6332
|
+
*/
|
|
6333
|
+
CODE_A: 1,
|
|
6334
|
+
|
|
6335
|
+
/**
|
|
6336
|
+
* <p>
|
|
6337
|
+
* Encode codetext only in 128B codeset.
|
|
6338
|
+
* </p>
|
|
6339
|
+
*/
|
|
6340
|
+
CODE_B: 2,
|
|
6341
|
+
|
|
6342
|
+
/**
|
|
6343
|
+
* <p>
|
|
6344
|
+
* Encode codetext only in 128C codeset.
|
|
6345
|
+
* </p>
|
|
6346
|
+
*/
|
|
6347
|
+
CODE_C: 4,
|
|
6348
|
+
|
|
6349
|
+
/**
|
|
6350
|
+
* <p>
|
|
6351
|
+
* Encode codetext only in 128A and 128B codesets.
|
|
6352
|
+
* </p>
|
|
6353
|
+
*/
|
|
6354
|
+
CODE_AB: 3,
|
|
6355
|
+
|
|
6356
|
+
/**
|
|
6357
|
+
* <p>
|
|
6358
|
+
* Encode codetext only in 128A and 128C codesets.
|
|
6359
|
+
* </p>
|
|
6360
|
+
*/
|
|
6361
|
+
CODE_AC: 5,
|
|
6362
|
+
|
|
6363
|
+
/**
|
|
6364
|
+
* <p>
|
|
6365
|
+
* Encode codetext only in 128B and 128C codesets.
|
|
6366
|
+
* </p>
|
|
6367
|
+
*/
|
|
6368
|
+
CODE_BC: 6
|
|
6369
|
+
}
|
|
6370
|
+
|
|
6371
|
+
/**
|
|
6372
|
+
* <p>
|
|
6373
|
+
* Version of Han Xin Code.
|
|
6374
|
+
* From Version01 - 23 x 23 modules to Version84 - 189 x 189 modules, increasing in steps of 2 modules per side.
|
|
6375
|
+
* </p>
|
|
6376
|
+
*/
|
|
6377
|
+
HanXinVersion =
|
|
6160
6378
|
{
|
|
6161
6379
|
/**
|
|
6162
6380
|
* <p>
|
|
6163
|
-
*
|
|
6381
|
+
* Specifies to automatically pick up the best version.
|
|
6382
|
+
* This is default value.
|
|
6164
6383
|
* </p>
|
|
6165
6384
|
*/
|
|
6166
|
-
AUTO:
|
|
6167
|
-
|
|
6385
|
+
AUTO:0,
|
|
6168
6386
|
/**
|
|
6169
6387
|
* <p>
|
|
6170
|
-
*
|
|
6388
|
+
* Specifies version 1 with 23 x 23 modules.
|
|
6171
6389
|
* </p>
|
|
6172
6390
|
*/
|
|
6173
|
-
|
|
6174
|
-
|
|
6391
|
+
VERSION_01:1,
|
|
6175
6392
|
/**
|
|
6176
6393
|
* <p>
|
|
6177
|
-
*
|
|
6394
|
+
* Specifies version 2 with 25 x 25 modules.
|
|
6178
6395
|
* </p>
|
|
6179
6396
|
*/
|
|
6180
|
-
|
|
6181
|
-
|
|
6397
|
+
VERSION_02:2,
|
|
6182
6398
|
/**
|
|
6183
6399
|
* <p>
|
|
6184
|
-
*
|
|
6400
|
+
* Specifies version 3 with 27 x 27 modules.
|
|
6185
6401
|
* </p>
|
|
6186
6402
|
*/
|
|
6187
|
-
|
|
6188
|
-
|
|
6403
|
+
VERSION_03:3,
|
|
6189
6404
|
/**
|
|
6190
6405
|
* <p>
|
|
6191
|
-
*
|
|
6406
|
+
* Specifies version 4 with 29 x 29 modules.
|
|
6192
6407
|
* </p>
|
|
6193
6408
|
*/
|
|
6194
|
-
|
|
6195
|
-
|
|
6409
|
+
VERSION_04:4,
|
|
6196
6410
|
/**
|
|
6197
6411
|
* <p>
|
|
6198
|
-
*
|
|
6412
|
+
* Specifies version 5 with 31 x 31 modules.
|
|
6199
6413
|
* </p>
|
|
6200
6414
|
*/
|
|
6201
|
-
|
|
6202
|
-
|
|
6415
|
+
VERSION_05:5,
|
|
6416
|
+
/**
|
|
6417
|
+
* <p>
|
|
6418
|
+
* Specifies version 6 with 33 x 33 modules.
|
|
6419
|
+
* </p>
|
|
6420
|
+
*/
|
|
6421
|
+
VERSION_06:6,
|
|
6422
|
+
/**
|
|
6423
|
+
* <p>
|
|
6424
|
+
* Specifies version 7 with 35 x 35 modules.
|
|
6425
|
+
* </p>
|
|
6426
|
+
*/
|
|
6427
|
+
VERSION_07:7,
|
|
6428
|
+
/**
|
|
6429
|
+
* <p>
|
|
6430
|
+
* Specifies version 8 with 37 x 37 modules.
|
|
6431
|
+
* </p>
|
|
6432
|
+
*/
|
|
6433
|
+
VERSION_08:8,
|
|
6434
|
+
/**
|
|
6435
|
+
* <p>
|
|
6436
|
+
* Specifies version 9 with 39 x 39 modules.
|
|
6437
|
+
* </p>
|
|
6438
|
+
*/
|
|
6439
|
+
VERSION_09:9,
|
|
6440
|
+
/**
|
|
6441
|
+
* <p>
|
|
6442
|
+
* Specifies version 10 with 41 x 41 modules.
|
|
6443
|
+
* </p>
|
|
6444
|
+
*/
|
|
6445
|
+
VERSION_10:10,
|
|
6446
|
+
/**
|
|
6447
|
+
* <p>
|
|
6448
|
+
* Specifies version 11 with 43 x 43 modules.
|
|
6449
|
+
* </p>
|
|
6450
|
+
*/
|
|
6451
|
+
VERSION_11:11,
|
|
6452
|
+
/**
|
|
6453
|
+
* <p>
|
|
6454
|
+
* Specifies version 12 with 45 x 45 modules.
|
|
6455
|
+
* </p>
|
|
6456
|
+
*/
|
|
6457
|
+
VERSION_12:12,
|
|
6458
|
+
/**
|
|
6459
|
+
* <p>
|
|
6460
|
+
* Specifies version 13 with 47 x 47 modules.
|
|
6461
|
+
* </p>
|
|
6462
|
+
*/
|
|
6463
|
+
VERSION_13:13,
|
|
6464
|
+
/**
|
|
6465
|
+
* <p>
|
|
6466
|
+
* Specifies version 14 with 49 x 49 modules.
|
|
6467
|
+
* </p>
|
|
6468
|
+
*/
|
|
6469
|
+
VERSION_14:14,
|
|
6470
|
+
/**
|
|
6471
|
+
* <p>
|
|
6472
|
+
* Specifies version 15 with 51 x 51 modules.
|
|
6473
|
+
* </p>
|
|
6474
|
+
*/
|
|
6475
|
+
VERSION_15:15,
|
|
6476
|
+
/**
|
|
6477
|
+
* <p>
|
|
6478
|
+
* Specifies version 16 with 53 x 53 modules.
|
|
6479
|
+
* </p>
|
|
6480
|
+
*/
|
|
6481
|
+
VERSION_16:16,
|
|
6482
|
+
/**
|
|
6483
|
+
* <p>
|
|
6484
|
+
* Specifies version 17 with 55 x 55 modules.
|
|
6485
|
+
* </p>
|
|
6486
|
+
*/
|
|
6487
|
+
VERSION_17:17,
|
|
6488
|
+
/**
|
|
6489
|
+
* <p>
|
|
6490
|
+
* Specifies version 18 with 57 x 57 modules.
|
|
6491
|
+
* </p>
|
|
6492
|
+
*/
|
|
6493
|
+
VERSION_18:18,
|
|
6494
|
+
/**
|
|
6495
|
+
* <p>
|
|
6496
|
+
* Specifies version 19 with 59 x 59 modules.
|
|
6497
|
+
* </p>
|
|
6498
|
+
*/
|
|
6499
|
+
VERSION_19:19,
|
|
6500
|
+
/**
|
|
6501
|
+
* <p>
|
|
6502
|
+
* Specifies version 20 with 61 x 61 modules.
|
|
6503
|
+
* </p>
|
|
6504
|
+
*/
|
|
6505
|
+
VERSION_20:20,
|
|
6506
|
+
/**
|
|
6507
|
+
* <p>
|
|
6508
|
+
* Specifies version 21 with 63 x 63 modules.
|
|
6509
|
+
* </p>
|
|
6510
|
+
*/
|
|
6511
|
+
VERSION_21:21,
|
|
6512
|
+
/**
|
|
6513
|
+
* <p>
|
|
6514
|
+
* Specifies version 22 with 65 x 65 modules.
|
|
6515
|
+
* </p>
|
|
6516
|
+
*/
|
|
6517
|
+
VERSION_22:22,
|
|
6518
|
+
/**
|
|
6519
|
+
* <p>
|
|
6520
|
+
* Specifies version 23 with 67 x 67 modules.
|
|
6521
|
+
* </p>
|
|
6522
|
+
*/
|
|
6523
|
+
VERSION_23:23,
|
|
6524
|
+
/**
|
|
6525
|
+
* <p>
|
|
6526
|
+
* Specifies version 24 with 69 x 69 modules.
|
|
6527
|
+
* </p>
|
|
6528
|
+
*/
|
|
6529
|
+
VERSION_24:24,
|
|
6530
|
+
/**
|
|
6531
|
+
* <p>
|
|
6532
|
+
* Specifies version 25 with 71 x 71 modules.
|
|
6533
|
+
* </p>
|
|
6534
|
+
*/
|
|
6535
|
+
VERSION_25:25,
|
|
6536
|
+
/**
|
|
6537
|
+
* <p>
|
|
6538
|
+
* Specifies version 26 with 73 x 73 modules.
|
|
6539
|
+
* </p>
|
|
6540
|
+
*/
|
|
6541
|
+
VERSION_26:26,
|
|
6542
|
+
/**
|
|
6543
|
+
* <p>
|
|
6544
|
+
* Specifies version 27 with 75 x 75 modules.
|
|
6545
|
+
* </p>
|
|
6546
|
+
*/
|
|
6547
|
+
VERSION_27:27,
|
|
6548
|
+
/**
|
|
6549
|
+
* <p>
|
|
6550
|
+
* Specifies version 28 with 77 x 77 modules.
|
|
6551
|
+
* </p>
|
|
6552
|
+
*/
|
|
6553
|
+
VERSION_28:28,
|
|
6554
|
+
/**
|
|
6555
|
+
* <p>
|
|
6556
|
+
* Specifies version 29 with 79 x 79 modules.
|
|
6557
|
+
* </p>
|
|
6558
|
+
*/
|
|
6559
|
+
VERSION_29:29,
|
|
6560
|
+
/**
|
|
6561
|
+
* <p>
|
|
6562
|
+
* Specifies version 30 with 81 x 81 modules.
|
|
6563
|
+
* </p>
|
|
6564
|
+
*/
|
|
6565
|
+
VERSION_30:30,
|
|
6566
|
+
/**
|
|
6567
|
+
* <p>
|
|
6568
|
+
* Specifies version 31 with 83 x 83 modules.
|
|
6569
|
+
* </p>
|
|
6570
|
+
*/
|
|
6571
|
+
VERSION_31:31,
|
|
6572
|
+
/**
|
|
6573
|
+
* <p>
|
|
6574
|
+
* Specifies version 32 with 85 x 85 modules.
|
|
6575
|
+
* </p>
|
|
6576
|
+
*/
|
|
6577
|
+
VERSION_32:32,
|
|
6578
|
+
/**
|
|
6579
|
+
* <p>
|
|
6580
|
+
* Specifies version 33 with 87 x 87 modules.
|
|
6581
|
+
* </p>
|
|
6582
|
+
*/
|
|
6583
|
+
VERSION_33:33,
|
|
6584
|
+
/**
|
|
6585
|
+
* <p>
|
|
6586
|
+
* Specifies version 34 with 89 x 89 modules.
|
|
6587
|
+
* </p>
|
|
6588
|
+
*/
|
|
6589
|
+
VERSION_34:34,
|
|
6590
|
+
/**
|
|
6591
|
+
* <p>
|
|
6592
|
+
* Specifies version 35 with 91 x 91 modules.
|
|
6593
|
+
* </p>
|
|
6594
|
+
*/
|
|
6595
|
+
VERSION_35:35,
|
|
6596
|
+
/**
|
|
6597
|
+
* <p>
|
|
6598
|
+
* Specifies version 36 with 93 x 93 modules.
|
|
6599
|
+
* </p>
|
|
6600
|
+
*/
|
|
6601
|
+
VERSION_36:36,
|
|
6602
|
+
/**
|
|
6603
|
+
* <p>
|
|
6604
|
+
* Specifies version 37 with 95 x 95 modules.
|
|
6605
|
+
* </p>
|
|
6606
|
+
*/
|
|
6607
|
+
VERSION_37:37,
|
|
6608
|
+
/**
|
|
6609
|
+
* <p>
|
|
6610
|
+
* Specifies version 38 with 97 x 97 modules.
|
|
6611
|
+
* </p>
|
|
6612
|
+
*/
|
|
6613
|
+
VERSION_38:38,
|
|
6614
|
+
/**
|
|
6615
|
+
* <p>
|
|
6616
|
+
* Specifies version 39 with 99 x 99 modules.
|
|
6617
|
+
* </p>
|
|
6618
|
+
*/
|
|
6619
|
+
VERSION_39:39,
|
|
6620
|
+
/**
|
|
6621
|
+
* <p>
|
|
6622
|
+
* Specifies version 40 with 101 x 101 modules.
|
|
6623
|
+
* </p>
|
|
6624
|
+
*/
|
|
6625
|
+
VERSION_40:40,
|
|
6626
|
+
/**
|
|
6627
|
+
* <p>
|
|
6628
|
+
* Specifies version 41 with 103 x 103 modules.
|
|
6629
|
+
* </p>
|
|
6630
|
+
*/
|
|
6631
|
+
VERSION_41:41,
|
|
6632
|
+
/**
|
|
6633
|
+
* <p>
|
|
6634
|
+
* Specifies version 42 with 105 x 105 modules.
|
|
6635
|
+
* </p>
|
|
6636
|
+
*/
|
|
6637
|
+
VERSION_42:42,
|
|
6638
|
+
/**
|
|
6639
|
+
* <p>
|
|
6640
|
+
* Specifies version 43 with 107 x 107 modules.
|
|
6641
|
+
* </p>
|
|
6642
|
+
*/
|
|
6643
|
+
VERSION_43:43,
|
|
6644
|
+
/**
|
|
6645
|
+
* <p>
|
|
6646
|
+
* Specifies version 44 with 109 x 109 modules.
|
|
6647
|
+
* </p>
|
|
6648
|
+
*/
|
|
6649
|
+
VERSION_44:44,
|
|
6650
|
+
/**
|
|
6651
|
+
* <p>
|
|
6652
|
+
* Specifies version 45 with 111 x 111 modules.
|
|
6653
|
+
* </p>
|
|
6654
|
+
*/
|
|
6655
|
+
VERSION_45:45,
|
|
6656
|
+
/**
|
|
6657
|
+
* <p>
|
|
6658
|
+
* Specifies version 46 with 113 x 113 modules.
|
|
6659
|
+
* </p>
|
|
6660
|
+
*/
|
|
6661
|
+
VERSION_46:46,
|
|
6662
|
+
/**
|
|
6663
|
+
* <p>
|
|
6664
|
+
* Specifies version 47 with 115 x 115 modules.
|
|
6665
|
+
* </p>
|
|
6666
|
+
*/
|
|
6667
|
+
VERSION_47:47,
|
|
6668
|
+
/**
|
|
6669
|
+
* <p>
|
|
6670
|
+
* Specifies version 48 with 117 x 117 modules.
|
|
6671
|
+
* </p>
|
|
6672
|
+
*/
|
|
6673
|
+
VERSION_48:48,
|
|
6674
|
+
/**
|
|
6675
|
+
* <p>
|
|
6676
|
+
* Specifies version 49 with 119 x 119 modules.
|
|
6677
|
+
* </p>
|
|
6678
|
+
*/
|
|
6679
|
+
VERSION_49:49,
|
|
6680
|
+
/**
|
|
6681
|
+
* <p>
|
|
6682
|
+
* Specifies version 50 with 121 x 121 modules.
|
|
6683
|
+
* </p>
|
|
6684
|
+
*/
|
|
6685
|
+
VERSION_50:50,
|
|
6686
|
+
/**
|
|
6687
|
+
* <p>
|
|
6688
|
+
* Specifies version 51 with 123 x 123 modules.
|
|
6689
|
+
* </p>
|
|
6690
|
+
*/
|
|
6691
|
+
VERSION_51:51,
|
|
6692
|
+
/**
|
|
6693
|
+
* <p>
|
|
6694
|
+
* Specifies version 52 with 125 x 125 modules.
|
|
6695
|
+
* </p>
|
|
6696
|
+
*/
|
|
6697
|
+
VERSION_52:52,
|
|
6698
|
+
/**
|
|
6699
|
+
* <p>
|
|
6700
|
+
* Specifies version 53 with 127 x 127 modules.
|
|
6701
|
+
* </p>
|
|
6702
|
+
*/
|
|
6703
|
+
VERSION_53:53,
|
|
6704
|
+
/**
|
|
6705
|
+
* <p>
|
|
6706
|
+
* Specifies version 54 with 129 x 129 modules.
|
|
6707
|
+
* </p>
|
|
6708
|
+
*/
|
|
6709
|
+
VERSION_54:54,
|
|
6710
|
+
/**
|
|
6711
|
+
* <p>
|
|
6712
|
+
* Specifies version 55 with 131 x 131 modules.
|
|
6713
|
+
* </p>
|
|
6714
|
+
*/
|
|
6715
|
+
VERSION_55:55,
|
|
6716
|
+
/**
|
|
6717
|
+
* <p>
|
|
6718
|
+
* Specifies version 56 with 133 x 133 modules.
|
|
6719
|
+
* </p>
|
|
6720
|
+
*/
|
|
6721
|
+
VERSION_56:56,
|
|
6722
|
+
/**
|
|
6723
|
+
* <p>
|
|
6724
|
+
* Specifies version 57 with 135 x 135 modules.
|
|
6725
|
+
* </p>
|
|
6726
|
+
*/
|
|
6727
|
+
VERSION_57:57,
|
|
6728
|
+
/**
|
|
6729
|
+
* <p>
|
|
6730
|
+
* Specifies version 58 with 137 x 137 modules.
|
|
6731
|
+
* </p>
|
|
6732
|
+
*/
|
|
6733
|
+
VERSION_58:58,
|
|
6734
|
+
/**
|
|
6735
|
+
* <p>
|
|
6736
|
+
* Specifies version 59 with 139 x 139 modules.
|
|
6737
|
+
* </p>
|
|
6738
|
+
*/
|
|
6739
|
+
VERSION_59:59,
|
|
6740
|
+
/**
|
|
6741
|
+
* <p>
|
|
6742
|
+
* Specifies version 60 with 141 x 141 modules.
|
|
6743
|
+
* </p>
|
|
6744
|
+
*/
|
|
6745
|
+
VERSION_60:60,
|
|
6746
|
+
/**
|
|
6747
|
+
* <p>
|
|
6748
|
+
* Specifies version 61 with 143 x 143 modules.
|
|
6749
|
+
* </p>
|
|
6750
|
+
*/
|
|
6751
|
+
VERSION_61:61,
|
|
6752
|
+
/**
|
|
6753
|
+
* <p>
|
|
6754
|
+
* Specifies version 62 with 145 x 145 modules.
|
|
6755
|
+
* </p>
|
|
6756
|
+
*/
|
|
6757
|
+
VERSION_62:62,
|
|
6758
|
+
/**
|
|
6759
|
+
* <p>
|
|
6760
|
+
* Specifies version 63 with 147 x 147 modules.
|
|
6761
|
+
* </p>
|
|
6762
|
+
*/
|
|
6763
|
+
VERSION_63:63,
|
|
6764
|
+
/**
|
|
6765
|
+
* <p>
|
|
6766
|
+
* Specifies version 64 with 149 x 149 modules.
|
|
6767
|
+
* </p>
|
|
6768
|
+
*/
|
|
6769
|
+
VERSION_64:64,
|
|
6770
|
+
/**
|
|
6771
|
+
* <p>
|
|
6772
|
+
* Specifies version 65 with 151 x 151 modules.
|
|
6773
|
+
* </p>
|
|
6774
|
+
*/
|
|
6775
|
+
VERSION_65:65,
|
|
6776
|
+
/**
|
|
6777
|
+
* <p>
|
|
6778
|
+
* Specifies version 66 with 153 x 153 modules.
|
|
6779
|
+
* </p>
|
|
6780
|
+
*/
|
|
6781
|
+
VERSION_66:66,
|
|
6782
|
+
/**
|
|
6783
|
+
* <p>
|
|
6784
|
+
* Specifies version 67 with 155 x 155 modules.
|
|
6785
|
+
* </p>
|
|
6786
|
+
*/
|
|
6787
|
+
VERSION_67:67,
|
|
6788
|
+
/**
|
|
6789
|
+
* <p>
|
|
6790
|
+
* Specifies version 68 with 157 x 157 modules.
|
|
6791
|
+
* </p>
|
|
6792
|
+
*/
|
|
6793
|
+
VERSION_68:68,
|
|
6794
|
+
/**
|
|
6795
|
+
* <p>
|
|
6796
|
+
* Specifies version 69 with 159 x 159 modules.
|
|
6797
|
+
* </p>
|
|
6798
|
+
*/
|
|
6799
|
+
VERSION_69:69,
|
|
6800
|
+
/**
|
|
6801
|
+
* <p>
|
|
6802
|
+
* Specifies version 70 with 161 x 161 modules.
|
|
6803
|
+
* </p>
|
|
6804
|
+
*/
|
|
6805
|
+
VERSION_70:70,
|
|
6806
|
+
/**
|
|
6807
|
+
* <p>
|
|
6808
|
+
* Specifies version 71 with 163 x 163 modules.
|
|
6809
|
+
* </p>
|
|
6810
|
+
*/
|
|
6811
|
+
VERSION_71:71,
|
|
6812
|
+
/**
|
|
6813
|
+
* <p>
|
|
6814
|
+
* Specifies version 72 with 165 x 165 modules.
|
|
6815
|
+
* </p>
|
|
6816
|
+
*/
|
|
6817
|
+
VERSION_72:72,
|
|
6818
|
+
/**
|
|
6819
|
+
* <p>
|
|
6820
|
+
* Specifies version 73 with 167 x 167 modules.
|
|
6821
|
+
* </p>
|
|
6822
|
+
*/
|
|
6823
|
+
VERSION_73:73,
|
|
6824
|
+
/**
|
|
6825
|
+
* <p>
|
|
6826
|
+
* Specifies version 74 with 169 x 169 modules.
|
|
6827
|
+
* </p>
|
|
6828
|
+
*/
|
|
6829
|
+
VERSION_74:74,
|
|
6830
|
+
/**
|
|
6831
|
+
* <p>
|
|
6832
|
+
* Specifies version 75 with 171 x 171 modules.
|
|
6833
|
+
* </p>
|
|
6834
|
+
*/
|
|
6835
|
+
VERSION_75:75,
|
|
6836
|
+
/**
|
|
6837
|
+
* <p>
|
|
6838
|
+
* Specifies version 76 with 173 x 173 modules.
|
|
6839
|
+
* </p>
|
|
6840
|
+
*/
|
|
6841
|
+
VERSION_76:76,
|
|
6842
|
+
/**
|
|
6843
|
+
* <p>
|
|
6844
|
+
* Specifies version 77 with 175 x 175 modules.
|
|
6845
|
+
* </p>
|
|
6846
|
+
*/
|
|
6847
|
+
VERSION_77:77,
|
|
6848
|
+
/**
|
|
6849
|
+
* <p>
|
|
6850
|
+
* Specifies version 78 with 177 x 177 modules.
|
|
6851
|
+
* </p>
|
|
6852
|
+
*/
|
|
6853
|
+
VERSION_78:78,
|
|
6854
|
+
/**
|
|
6855
|
+
* <p>
|
|
6856
|
+
* Specifies version 79 with 179 x 179 modules.
|
|
6857
|
+
* </p>
|
|
6858
|
+
*/
|
|
6859
|
+
VERSION_79:79,
|
|
6860
|
+
/**
|
|
6861
|
+
* <p>
|
|
6862
|
+
* Specifies version 80 with 181 x 181 modules.
|
|
6863
|
+
* </p>
|
|
6864
|
+
*/
|
|
6865
|
+
VERSION_80:80,
|
|
6866
|
+
/**
|
|
6867
|
+
* <p>
|
|
6868
|
+
* Specifies version 81 with 183 x 183 modules.
|
|
6869
|
+
* </p>
|
|
6870
|
+
*/
|
|
6871
|
+
VERSION_81:81,
|
|
6872
|
+
/**
|
|
6873
|
+
* <p>
|
|
6874
|
+
* Specifies version 82 with 185 x 185 modules.
|
|
6875
|
+
* </p>
|
|
6876
|
+
*/
|
|
6877
|
+
VERSION_82:82,
|
|
6878
|
+
/**
|
|
6879
|
+
* <p>
|
|
6880
|
+
* Specifies version 83 with 187 x 187 modules.
|
|
6881
|
+
* </p>
|
|
6882
|
+
*/
|
|
6883
|
+
VERSION_83:83,
|
|
6884
|
+
/**
|
|
6885
|
+
* <p>
|
|
6886
|
+
* Specifies version 84 with 189 x 189 modules.
|
|
6887
|
+
* </p>
|
|
6888
|
+
*/
|
|
6889
|
+
VERSION_84:84,
|
|
6890
|
+
}
|
|
6891
|
+
|
|
6892
|
+
/**
|
|
6893
|
+
* <p>
|
|
6894
|
+
* Level of Reed-Solomon error correction. From low to high: L1, L2, L3, L4.
|
|
6895
|
+
* </p>
|
|
6896
|
+
*/
|
|
6897
|
+
HanXinErrorLevel =
|
|
6898
|
+
{
|
|
6899
|
+
/**
|
|
6900
|
+
* <p>
|
|
6901
|
+
* Allows recovery of 8% of the code text
|
|
6902
|
+
* </p>
|
|
6903
|
+
*/
|
|
6904
|
+
L1:0,
|
|
6905
|
+
/**
|
|
6906
|
+
* <p>
|
|
6907
|
+
* Allows recovery of 15% of the code text
|
|
6908
|
+
* </p>
|
|
6909
|
+
*/
|
|
6910
|
+
L2:1,
|
|
6911
|
+
/**
|
|
6912
|
+
* <p>
|
|
6913
|
+
* Allows recovery of 23% of the code text
|
|
6914
|
+
* </p>
|
|
6915
|
+
*/
|
|
6916
|
+
L3:2,
|
|
6917
|
+
/**
|
|
6918
|
+
* <p>
|
|
6919
|
+
* Allows recovery of 30% of the code text
|
|
6920
|
+
* </p>
|
|
6921
|
+
*/
|
|
6922
|
+
L4:3
|
|
6923
|
+
}
|
|
6924
|
+
|
|
6925
|
+
/**
|
|
6926
|
+
* <p>
|
|
6927
|
+
* Han Xin Code encoding mode. It is recommended to use Auto with ASCII / Chinese characters or Unicode for Unicode characters.
|
|
6928
|
+
* </p><p><hr><blockquote><pre>
|
|
6929
|
+
* <pre>
|
|
6930
|
+
* @example
|
|
6931
|
+
* // Auto mode
|
|
6932
|
+
* let codetext = "1234567890ABCDEFGabcdefg,Han Xin Code";
|
|
6933
|
+
* let generator = new BarcodeGenerator(EncodeTypes.HAN_XIN, codetext);
|
|
6934
|
+
* generator.save("test.bmp", BarcodeImageFormat.BMP);
|
|
6935
|
+
*
|
|
6936
|
+
* @example
|
|
6937
|
+
* // Bytes mode
|
|
6938
|
+
* let encodedArr = [0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9];
|
|
6939
|
+
*
|
|
6940
|
+
* //encode array to string
|
|
6941
|
+
* let codetext = "";
|
|
6942
|
+
* for (int i = 0; i <encodedArr.length; i++)
|
|
6943
|
+
* {
|
|
6944
|
+
* let bval = String.fromCharCode(encodedArr[i]);
|
|
6945
|
+
* codetext += bval;
|
|
6946
|
+
* }
|
|
6947
|
+
*
|
|
6948
|
+
* let generator = new BarcodeGenerator(EncodeTypes.HAN_XIN, codetext);
|
|
6949
|
+
* generator.getParameters().getBarcode().getHanXin().setHanXinEncodeMode(HanXinEncodeMode.BYTES);
|
|
6950
|
+
* generator.save("test.bmp", BarcodeImageFormat.BMP);
|
|
6951
|
+
*
|
|
6952
|
+
* @example
|
|
6953
|
+
* // ECI mode
|
|
6954
|
+
* let codetext = "ΑΒΓΔΕ";
|
|
6955
|
+
* let generator = new BarcodeGenerator(EncodeTypes.HAN_XIN, codetext);
|
|
6956
|
+
* generator.getParameters().getBarcode().getHanXin().setHanXinEncodeMode(HanXinEncodeMode.ECI);
|
|
6957
|
+
* generator.getParameters().getBarcode().getHanXin().setHanXinECIEncoding(ECIEncodings.ISO_8859_7);
|
|
6958
|
+
* generator.save("test.bmp", BarcodeImageFormat.BMP);
|
|
6959
|
+
*
|
|
6960
|
+
* @example
|
|
6961
|
+
* // URI mode
|
|
6962
|
+
* let codetext = "https://www.test.com/%BC%DE%%%ab/search=test";
|
|
6963
|
+
* generator = new BarcodeGenerator(EncodeTypes.HAN_XIN, codetext);
|
|
6964
|
+
* generator.getParameters().getBarcode().getHanXin().setHanXinEncodeMode(HanXinEncodeMode.URI);
|
|
6965
|
+
* generator.save("test.bmp", BarcodeImageFormat.BMP);
|
|
6966
|
+
*
|
|
6967
|
+
* // Extended mode - TBD
|
|
6968
|
+
* </pre>
|
|
6969
|
+
* </pre></blockquote></hr></p>
|
|
6970
|
+
*/
|
|
6971
|
+
HanXinEncodeMode =
|
|
6972
|
+
{
|
|
6973
|
+
/**
|
|
6974
|
+
* <p>
|
|
6975
|
+
* Sequence of Numeric, Text, ECI, Binary Bytes and 4 GB18030 modes changing automatically.
|
|
6976
|
+
* </p>
|
|
6977
|
+
*/
|
|
6978
|
+
AUTO:0,
|
|
6979
|
+
/**
|
|
6980
|
+
* <p>
|
|
6981
|
+
* Binary byte mode encodes binary data in any form and encodes them in their binary byte. Every byte in
|
|
6982
|
+
* Binary Byte mode is represented by 8 bits.
|
|
6983
|
+
* </p>
|
|
6984
|
+
*/
|
|
6985
|
+
BINARY:1,
|
|
6986
|
+
/**
|
|
6987
|
+
* <p>
|
|
6988
|
+
* Extended Channel Interpretation (ECI) mode
|
|
6989
|
+
* </p>
|
|
6990
|
+
*/
|
|
6991
|
+
ECI:2,
|
|
6992
|
+
/**
|
|
6993
|
+
* <p>
|
|
6994
|
+
* Unicode mode designs a way to represent any text data reference to UTF8 encoding/charset in Han Xin Code.
|
|
6995
|
+
* </p>
|
|
6996
|
+
*/
|
|
6997
|
+
UNICODE:3,
|
|
6998
|
+
/**
|
|
6999
|
+
* <p>
|
|
7000
|
+
* URI mode indicates the data represented in Han Xin Code is Uniform Resource Identifier (URI)
|
|
7001
|
+
* reference to RFC 3986.
|
|
7002
|
+
* </p>
|
|
7003
|
+
*/
|
|
7004
|
+
URI:4,
|
|
6203
7005
|
/**
|
|
6204
7006
|
* <p>
|
|
6205
|
-
*
|
|
7007
|
+
* Extended mode will allow more flexible combinations of other modes, this mode is currently not implemented.
|
|
6206
7008
|
* </p>
|
|
6207
7009
|
*/
|
|
6208
|
-
|
|
7010
|
+
EXTENDED:5
|
|
6209
7011
|
}
|
|
6210
7012
|
|
|
6211
7013
|
module.exports = {
|
|
@@ -6271,5 +7073,9 @@ module.exports = {
|
|
|
6271
7073
|
MaxiCodeExtCodetextBuilder,
|
|
6272
7074
|
DotCodeExtCodetextBuilder,
|
|
6273
7075
|
DotCodeEncodeMode,
|
|
6274
|
-
|
|
7076
|
+
HanXinEncodeMode,
|
|
7077
|
+
HanXinErrorLevel,
|
|
7078
|
+
HanXinVersion,
|
|
7079
|
+
Code128EncodeMode,
|
|
7080
|
+
HanXinParameters
|
|
6275
7081
|
};
|