aspose.barcode 22.11.0 → 23.1.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 +1493 -20
- package/lib/Generation.js +550 -17
- package/lib/Joint.js +1 -1
- package/lib/Recognition.js +187 -7
- package/lib/{aspose-barcode-nodejs-22.11.jar → aspose-barcode-nodejs-23.1.jar} +0 -0
- package/package.json +1 -1
package/lib/Generation.js
CHANGED
|
@@ -2208,21 +2208,127 @@ class DotCodeParameters extends joint.BaseJavaClass
|
|
|
2208
2208
|
}
|
|
2209
2209
|
|
|
2210
2210
|
/**
|
|
2211
|
-
*
|
|
2212
|
-
*
|
|
2211
|
+
* <p>
|
|
2212
|
+
* Identifies DotCode encode mode.
|
|
2213
|
+
* Default value: Auto.
|
|
2214
|
+
* </p>
|
|
2213
2215
|
*/
|
|
2214
|
-
|
|
2216
|
+
getDotCodeEncodeMode()
|
|
2215
2217
|
{
|
|
2216
|
-
return this.getJavaClass().
|
|
2218
|
+
return this.getJavaClass().getDotCodeEncodeModeSync();
|
|
2217
2219
|
}
|
|
2218
|
-
|
|
2219
2220
|
/**
|
|
2220
|
-
*
|
|
2221
|
-
*
|
|
2221
|
+
* <p>
|
|
2222
|
+
* Identifies DotCode encode mode.
|
|
2223
|
+
* Default value: Auto.
|
|
2224
|
+
* </p>
|
|
2222
2225
|
*/
|
|
2223
|
-
|
|
2226
|
+
setDotCodeEncodeMode(value)
|
|
2224
2227
|
{
|
|
2225
|
-
this.getJavaClass().
|
|
2228
|
+
this.getJavaClass().setDotCodeEncodeModeSync(value);
|
|
2229
|
+
}
|
|
2230
|
+
|
|
2231
|
+
/**
|
|
2232
|
+
* <p>
|
|
2233
|
+
* Indicates whether code is used for instruct reader to interpret the following data as instructions for initialization or reprogramming of the bar code reader.
|
|
2234
|
+
* Default value is false.
|
|
2235
|
+
* </p>
|
|
2236
|
+
*/
|
|
2237
|
+
isReaderInitialization()
|
|
2238
|
+
{ return this.getJavaClass().isReaderInitializationSync(); }
|
|
2239
|
+
/**
|
|
2240
|
+
* <p>
|
|
2241
|
+
* Indicates whether code is used for instruct reader to interpret the following data as instructions for initialization or reprogramming of the bar code reader.
|
|
2242
|
+
* Default value is false.
|
|
2243
|
+
* </p>
|
|
2244
|
+
*/
|
|
2245
|
+
setReaderInitialization(value)
|
|
2246
|
+
{ this.getJavaClass().setReaderInitializationSync(value); }
|
|
2247
|
+
|
|
2248
|
+
/**
|
|
2249
|
+
* <p>
|
|
2250
|
+
* Identifies the ID of the DotCode structured append mode barcode. ID starts from 1 and must be less or equal to barcodes count. Default value is -1.
|
|
2251
|
+
* </p>
|
|
2252
|
+
*/
|
|
2253
|
+
getDotCodeStructuredAppendModeBarcodeId()
|
|
2254
|
+
{ return this.getJavaClass().getDotCodeStructuredAppendModeBarcodeIdSync(); }
|
|
2255
|
+
|
|
2256
|
+
/**
|
|
2257
|
+
* <p>
|
|
2258
|
+
* Identifies the ID of the DotCode structured append mode barcode. ID starts from 1 and must be less or equal to barcodes count. Default value is -1.
|
|
2259
|
+
* </p>
|
|
2260
|
+
*/
|
|
2261
|
+
setDotCodeStructuredAppendModeBarcodeId(value)
|
|
2262
|
+
{ this.getJavaClass().setDotCodeStructuredAppendModeBarcodeIdSync(value); }
|
|
2263
|
+
|
|
2264
|
+
/**
|
|
2265
|
+
* <p>
|
|
2266
|
+
* Identifies DotCode structured append mode barcodes count. Default value is -1. Count must be a value from 1 to 35.
|
|
2267
|
+
* </p>
|
|
2268
|
+
*/
|
|
2269
|
+
getDotCodeStructuredAppendModeBarcodesCount()
|
|
2270
|
+
{ return this.getJavaClass().getDotCodeStructuredAppendModeBarcodesCountSync(); }
|
|
2271
|
+
/**
|
|
2272
|
+
* <p>
|
|
2273
|
+
* Identifies DotCode structured append mode barcodes count. Default value is -1. Count must be a value from 1 to 35.
|
|
2274
|
+
* </p>
|
|
2275
|
+
*/
|
|
2276
|
+
setDotCodeStructuredAppendModeBarcodesCount(value)
|
|
2277
|
+
{ this.getJavaClass().setDotCodeStructuredAppendModeBarcodesCountSync(value); }
|
|
2278
|
+
|
|
2279
|
+
/**
|
|
2280
|
+
* <p>
|
|
2281
|
+
* Identifies ECI encoding. Used when DotCodeEncodeMode is Auto.
|
|
2282
|
+
* Default value: ISO-8859-1
|
|
2283
|
+
* </p>
|
|
2284
|
+
*/
|
|
2285
|
+
getECIEncoding()
|
|
2286
|
+
{ return this.getJavaClass().getECIEncodingSync(); }
|
|
2287
|
+
/**
|
|
2288
|
+
* <p>
|
|
2289
|
+
* Identifies ECI encoding. Used when DotCodeEncodeMode is Auto.
|
|
2290
|
+
* Default value: ISO-8859-1
|
|
2291
|
+
* </p>
|
|
2292
|
+
*/
|
|
2293
|
+
setECIEncoding(value)
|
|
2294
|
+
{ this.getJavaClass().setECIEncodingSync(value); }
|
|
2295
|
+
|
|
2296
|
+
/**
|
|
2297
|
+
* <p>
|
|
2298
|
+
* 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.
|
|
2299
|
+
* Default value: -1
|
|
2300
|
+
* </p>
|
|
2301
|
+
*/
|
|
2302
|
+
getRows()
|
|
2303
|
+
{ return this.getJavaClass().getRowsSync(); }
|
|
2304
|
+
/**
|
|
2305
|
+
* <p>
|
|
2306
|
+
* 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.
|
|
2307
|
+
* Default value: -1
|
|
2308
|
+
* </p>
|
|
2309
|
+
*/
|
|
2310
|
+
setRows(value)
|
|
2311
|
+
{
|
|
2312
|
+
this.getJavaClass().setRowsSync(value);
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
/**
|
|
2316
|
+
* <p>
|
|
2317
|
+
* 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.
|
|
2318
|
+
* Default value: -1
|
|
2319
|
+
* </p>
|
|
2320
|
+
*/
|
|
2321
|
+
getColumns()
|
|
2322
|
+
{ return this.getJavaClass().getColumnsSync(); }
|
|
2323
|
+
/**
|
|
2324
|
+
* <p>
|
|
2325
|
+
* 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.
|
|
2326
|
+
* Default value: -1
|
|
2327
|
+
* </p>
|
|
2328
|
+
*/
|
|
2329
|
+
setColumns(value)
|
|
2330
|
+
{
|
|
2331
|
+
this.getJavaClass().setColumnsSync(value);
|
|
2226
2332
|
}
|
|
2227
2333
|
|
|
2228
2334
|
/**
|
|
@@ -3733,6 +3839,110 @@ class MaxiCodeExtCodetextBuilder extends ExtCodetextBuilder
|
|
|
3733
3839
|
}
|
|
3734
3840
|
}
|
|
3735
3841
|
|
|
3842
|
+
/**
|
|
3843
|
+
* <p>
|
|
3844
|
+
* <p>Extended codetext generator for 2D DotCode barcodes for ExtendedCodetext Mode of DotCodeEncodeMode</p>
|
|
3845
|
+
* </p><p><hr><blockquote><pre>
|
|
3846
|
+
* <pre>
|
|
3847
|
+
*
|
|
3848
|
+
* //Extended codetext mode
|
|
3849
|
+
* //create codetext
|
|
3850
|
+
* let textBuilder = new DotCodeExtCodetextBuilder();
|
|
3851
|
+
* textBuilder.addFNC1FormatIdentifier();
|
|
3852
|
+
* textBuilder.addECICodetext(ECIEncodings.Win1251, "Will");
|
|
3853
|
+
* textBuilder.addFNC1FormatIdentifier();
|
|
3854
|
+
* textBuilder.addECICodetext(ECIEncodings.UTF8, "犬Right狗");
|
|
3855
|
+
* textBuilder.addFNC1FormatIdentifier();
|
|
3856
|
+
* textBuilder.addECICodetext(ECIEncodings.UTF16BE, "犬Power狗");
|
|
3857
|
+
* textBuilder.addPlainCodetext("Plain text");
|
|
3858
|
+
* textBuilder.addFNC3SymbolSeparator();
|
|
3859
|
+
* textBuilder.addFNC3ReaderInitialization();
|
|
3860
|
+
* textBuilder.addPlainCodetext("Reader initialization info");
|
|
3861
|
+
* //generate codetext
|
|
3862
|
+
* let codetext = textBuilder.getExtendedCodetext();
|
|
3863
|
+
* //generate
|
|
3864
|
+
* let generator = new BarcodeGenerator(EncodeTypes.DOT_CODE, codetext);
|
|
3865
|
+
* {
|
|
3866
|
+
* generator.getParameters().getBarcode().getDotCode().setDotCodeEncodeMode(DotCodeEncodeMode.EXTENDED_CODETEXT);
|
|
3867
|
+
* generator.save("test.bmp", BarCodeImageFormat.BMP);
|
|
3868
|
+
* }
|
|
3869
|
+
* </pre>
|
|
3870
|
+
* </pre></blockquote></hr></p>
|
|
3871
|
+
*/
|
|
3872
|
+
class DotCodeExtCodetextBuilder extends ExtCodetextBuilder
|
|
3873
|
+
{
|
|
3874
|
+
static JAVA_CLASS_NAME = "com.aspose.mw.barcode.generation.MwDotCodeExtCodetextBuilder";
|
|
3875
|
+
|
|
3876
|
+
constructor()
|
|
3877
|
+
{
|
|
3878
|
+
let java_class_link = java.import(DotCodeExtCodetextBuilder.JAVA_CLASS_NAME);
|
|
3879
|
+
let javaClass = new java_class_link();
|
|
3880
|
+
super(javaClass);
|
|
3881
|
+
}
|
|
3882
|
+
|
|
3883
|
+
static construct(javaClass)
|
|
3884
|
+
{
|
|
3885
|
+
let obj = new DotCodeExtCodetextBuilder();
|
|
3886
|
+
obj.setJavaClass(javaClass)
|
|
3887
|
+
return obj;
|
|
3888
|
+
}
|
|
3889
|
+
|
|
3890
|
+
/**
|
|
3891
|
+
* <p>
|
|
3892
|
+
* Adds FNC1 format identifier to the extended codetext items
|
|
3893
|
+
* </p>
|
|
3894
|
+
*/
|
|
3895
|
+
addFNC1FormatIdentifier()
|
|
3896
|
+
{
|
|
3897
|
+
this.getJavaClass().addFNC1FormatIdentifierSync();
|
|
3898
|
+
}
|
|
3899
|
+
|
|
3900
|
+
/**
|
|
3901
|
+
* <p>
|
|
3902
|
+
* Adds FNC3 symbol separator to the extended codetext items
|
|
3903
|
+
* </p>
|
|
3904
|
+
*/
|
|
3905
|
+
addFNC3SymbolSeparator()
|
|
3906
|
+
{
|
|
3907
|
+
this.getJavaClass().addFNC3SymbolSeparatorSync();
|
|
3908
|
+
}
|
|
3909
|
+
|
|
3910
|
+
/**
|
|
3911
|
+
* <p>
|
|
3912
|
+
* Adds FNC3 reader initialization to the extended codetext items
|
|
3913
|
+
* </p>
|
|
3914
|
+
*/
|
|
3915
|
+
addFNC3ReaderInitialization()
|
|
3916
|
+
{
|
|
3917
|
+
this.getJavaClass().addFNC3ReaderInitializationSync();
|
|
3918
|
+
}
|
|
3919
|
+
|
|
3920
|
+
/**
|
|
3921
|
+
* <p>
|
|
3922
|
+
* Adds structured append mode to the extended codetext items
|
|
3923
|
+
* </p>
|
|
3924
|
+
* @param barcodeId ID of barcode
|
|
3925
|
+
* @param barcodesCount Barcodes count
|
|
3926
|
+
*/
|
|
3927
|
+
addStructuredAppendMode(barcodeId, barcodesCount)
|
|
3928
|
+
{
|
|
3929
|
+
this.getJavaClass().addStructuredAppendModeSync(barcodeId, barcodesCount);
|
|
3930
|
+
}
|
|
3931
|
+
|
|
3932
|
+
/**
|
|
3933
|
+
* <p>
|
|
3934
|
+
* Generates Extended codetext from the extended codetext list.
|
|
3935
|
+
* </p>
|
|
3936
|
+
* @return Extended codetext as string
|
|
3937
|
+
*/
|
|
3938
|
+
getExtendedCodetext()
|
|
3939
|
+
{
|
|
3940
|
+
return this.getJavaClass().getExtendedCodetextSync();
|
|
3941
|
+
}
|
|
3942
|
+
|
|
3943
|
+
init() {}
|
|
3944
|
+
}
|
|
3945
|
+
|
|
3736
3946
|
/**
|
|
3737
3947
|
* BarcodeClassifications EncodeTypes classification
|
|
3738
3948
|
* @enum
|
|
@@ -3862,11 +4072,11 @@ DataMatrixEncodeMode =
|
|
|
3862
4072
|
* @example
|
|
3863
4073
|
* //This sample shows how to do codetext in Extended Mode.
|
|
3864
4074
|
*
|
|
3865
|
-
*
|
|
3866
|
-
*
|
|
3867
|
-
*
|
|
3868
|
-
*
|
|
3869
|
-
*
|
|
4075
|
+
* let generator = new BarcodeGenerator(EncodeTypes.DATA_MATRIX);
|
|
4076
|
+
* generator.setCodeText("\\ansix12:ANSIX12TEXT\\ascii:backslash must be \\\\ doubled\\edifact:EdifactEncodedText");
|
|
4077
|
+
* generator.getParameters().getBarcode().getDataMatrix().setDataMatrixEncodeMode(DataMatrixEncodeMode.EXTENDED_CODETEXT);
|
|
4078
|
+
* generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text");
|
|
4079
|
+
* generator.save("test.png", BarcodeImageFormat.PNG);
|
|
3870
4080
|
*/
|
|
3871
4081
|
EXTENDED_CODETEXT: 12
|
|
3872
4082
|
};
|
|
@@ -4972,8 +5182,248 @@ EncodeTypes =
|
|
|
4972
5182
|
/**
|
|
4973
5183
|
* Specifies that the data should be encoded with <b>GS1 Composite Bar</b> barcode specification. The codetext must contains parentheses for AI. 1D codetext and 2D codetext must be separated with symbol '/'
|
|
4974
5184
|
*/
|
|
4975
|
-
GS_1_COMPOSITE_BAR:
|
|
4976
|
-
|
|
5185
|
+
GS_1_COMPOSITE_BAR: 67,
|
|
5186
|
+
|
|
5187
|
+
/**
|
|
5188
|
+
* <p>
|
|
5189
|
+
* Specifies that the data should be encoded with {@code <b>HIBC LIC Code39Standart</b>} barcode specification.
|
|
5190
|
+
* </p>
|
|
5191
|
+
*/
|
|
5192
|
+
HIBC_CODE_39_LIC: 68,
|
|
5193
|
+
|
|
5194
|
+
/**
|
|
5195
|
+
* <p>
|
|
5196
|
+
* Specifies that the data should be encoded with {@code <b>HIBC LIC Code128</b>} barcode specification.
|
|
5197
|
+
* </p>
|
|
5198
|
+
*/
|
|
5199
|
+
HIBC_CODE_128_LIC: 69,
|
|
5200
|
+
|
|
5201
|
+
/**
|
|
5202
|
+
* <p>
|
|
5203
|
+
* Specifies that the data should be encoded with {@code <b>HIBC LIC Aztec</b>} barcode specification.
|
|
5204
|
+
* </p>
|
|
5205
|
+
*/
|
|
5206
|
+
HIBC_AZTEC_LIC: 70,
|
|
5207
|
+
|
|
5208
|
+
/**
|
|
5209
|
+
* <p>
|
|
5210
|
+
* Specifies that the data should be encoded with {@code <b>HIBC LIC DataMatrix</b>} barcode specification.
|
|
5211
|
+
* </p>
|
|
5212
|
+
*/
|
|
5213
|
+
HIBC_DATA_MATRIX_LIC: 71,
|
|
5214
|
+
|
|
5215
|
+
/**
|
|
5216
|
+
* <p>
|
|
5217
|
+
* Specifies that the data should be encoded with {@code <b>HIBC LIC QR</b>} barcode specification.
|
|
5218
|
+
* </p>
|
|
5219
|
+
*/
|
|
5220
|
+
HIBCQRLIC: 72,
|
|
5221
|
+
|
|
5222
|
+
/**
|
|
5223
|
+
* <p>
|
|
5224
|
+
* Specifies that the data should be encoded with {@code <b>HIBC PAS Code39Standart</b>} barcode specification.
|
|
5225
|
+
* </p>
|
|
5226
|
+
*/
|
|
5227
|
+
HIBC_CODE_39_PAS: 73,
|
|
5228
|
+
|
|
5229
|
+
/**
|
|
5230
|
+
* <p>
|
|
5231
|
+
* Specifies that the data should be encoded with {@code <b>HIBC PAS Code128</b>} barcode specification.
|
|
5232
|
+
* </p>
|
|
5233
|
+
*/
|
|
5234
|
+
HIBC_CODE_128_PAS: 74,
|
|
5235
|
+
|
|
5236
|
+
/**
|
|
5237
|
+
* <p>
|
|
5238
|
+
* Specifies that the data should be encoded with {@code <b>HIBC PAS Aztec</b>} barcode specification.
|
|
5239
|
+
* </p>
|
|
5240
|
+
*/
|
|
5241
|
+
HIBC_AZTEC_PAS: 75,
|
|
5242
|
+
|
|
5243
|
+
/**
|
|
5244
|
+
* <p>
|
|
5245
|
+
* Specifies that the data should be encoded with {@code <b>HIBC PAS DataMatrix</b>} barcode specification.
|
|
5246
|
+
* </p>
|
|
5247
|
+
*/
|
|
5248
|
+
HIBC_DATA_MATRIX_PAS: 76,
|
|
5249
|
+
|
|
5250
|
+
/**
|
|
5251
|
+
* <p>
|
|
5252
|
+
* Specifies that the data should be encoded with {@code <b>HIBC PAS QR</b>} barcode specification.
|
|
5253
|
+
* </p>
|
|
5254
|
+
*/
|
|
5255
|
+
HIBCQRPAS: 77,
|
|
5256
|
+
|
|
5257
|
+
/**
|
|
5258
|
+
* <p>
|
|
5259
|
+
* Specifies that the data should be encoded with {@code <b>GS1 DotCode</b>} barcode specification. The codetext must contains parentheses for AI.
|
|
5260
|
+
* </p>
|
|
5261
|
+
*/
|
|
5262
|
+
GS_1_DOT_CODE: 78,
|
|
5263
|
+
|
|
5264
|
+
parse(encodeTypeName)
|
|
5265
|
+
{
|
|
5266
|
+
if(encodeTypeName == "CODABAR") return 0;
|
|
5267
|
+
|
|
5268
|
+
else if(encodeTypeName == "CODE_11") return 1;
|
|
5269
|
+
|
|
5270
|
+
else if(encodeTypeName == "CODE_39_STANDARD") return 2;
|
|
5271
|
+
|
|
5272
|
+
else if(encodeTypeName == "CODE_39_EXTENDED") return 3;
|
|
5273
|
+
|
|
5274
|
+
else if(encodeTypeName == "CODE_93_STANDARD") return 4;
|
|
5275
|
+
|
|
5276
|
+
else if(encodeTypeName == "CODE_93_EXTENDED") return 5;
|
|
5277
|
+
|
|
5278
|
+
else if(encodeTypeName == "CODE_128") return 6;
|
|
5279
|
+
|
|
5280
|
+
else if(encodeTypeName == "GS_1_CODE_128") return 7;
|
|
5281
|
+
|
|
5282
|
+
else if(encodeTypeName == "EAN_8") return 8;
|
|
5283
|
+
|
|
5284
|
+
else if(encodeTypeName == "EAN_13") return 9;
|
|
5285
|
+
|
|
5286
|
+
else if(encodeTypeName == "EAN_14") return 10;
|
|
5287
|
+
|
|
5288
|
+
else if(encodeTypeName == "SCC_14") return 11;
|
|
5289
|
+
|
|
5290
|
+
else if(encodeTypeName == "SSCC_18") return 12;
|
|
5291
|
+
|
|
5292
|
+
else if(encodeTypeName == "UPCA") return 13;
|
|
5293
|
+
|
|
5294
|
+
else if(encodeTypeName == "UPCE") return 14;
|
|
5295
|
+
|
|
5296
|
+
else if(encodeTypeName == "ISBN") return 15;
|
|
5297
|
+
|
|
5298
|
+
else if(encodeTypeName == "ISSN") return 16;
|
|
5299
|
+
|
|
5300
|
+
else if(encodeTypeName == "ISMN") return 17;
|
|
5301
|
+
|
|
5302
|
+
else if(encodeTypeName == "STANDARD_2_OF_5") return 18;
|
|
5303
|
+
|
|
5304
|
+
else if(encodeTypeName == "INTERLEAVED_2_OF_5") return 19;
|
|
5305
|
+
|
|
5306
|
+
else if(encodeTypeName == "MATRIX_2_OF_5") return 20;
|
|
5307
|
+
|
|
5308
|
+
else if(encodeTypeName == "ITALIAN_POST_25") return 21;
|
|
5309
|
+
|
|
5310
|
+
else if(encodeTypeName == "IATA_2_OF_5") return 22;
|
|
5311
|
+
|
|
5312
|
+
else if(encodeTypeName == "ITF_14") return 23;
|
|
5313
|
+
|
|
5314
|
+
else if(encodeTypeName == "ITF_6") return 24;
|
|
5315
|
+
|
|
5316
|
+
else if(encodeTypeName == "MSI") return 25;
|
|
5317
|
+
|
|
5318
|
+
else if(encodeTypeName == "VIN") return 26;
|
|
5319
|
+
|
|
5320
|
+
else if(encodeTypeName == "DEUTSCHE_POST_IDENTCODE") return 27;
|
|
5321
|
+
|
|
5322
|
+
else if(encodeTypeName == "DEUTSCHE_POST_LEITCODE") return 28;
|
|
5323
|
+
|
|
5324
|
+
else if(encodeTypeName == "OPC") return 29;
|
|
5325
|
+
|
|
5326
|
+
else if(encodeTypeName == "PZN") return 30;
|
|
5327
|
+
|
|
5328
|
+
else if(encodeTypeName == "CODE_16_K") return 31;
|
|
5329
|
+
|
|
5330
|
+
else if(encodeTypeName == "PHARMACODE") return 32;
|
|
5331
|
+
|
|
5332
|
+
else if(encodeTypeName == "DATA_MATRIX") return 33;
|
|
5333
|
+
|
|
5334
|
+
else if(encodeTypeName == "QR") return 34;
|
|
5335
|
+
|
|
5336
|
+
else if(encodeTypeName == "AZTEC") return 35;
|
|
5337
|
+
|
|
5338
|
+
else if(encodeTypeName == "PDF_417") return 36;
|
|
5339
|
+
|
|
5340
|
+
else if(encodeTypeName == "MACRO_PDF_417") return 37;
|
|
5341
|
+
|
|
5342
|
+
else if(encodeTypeName == "GS_1_DATA_MATRIX") return 48;
|
|
5343
|
+
|
|
5344
|
+
else if(encodeTypeName == "MICRO_PDF_417") return 55;
|
|
5345
|
+
|
|
5346
|
+
else if(encodeTypeName == "GS_1_QR") return 56;
|
|
5347
|
+
|
|
5348
|
+
else if(encodeTypeName == "MAXI_CODE") return 57;
|
|
5349
|
+
|
|
5350
|
+
else if(encodeTypeName == "DOT_CODE") return 60;
|
|
5351
|
+
|
|
5352
|
+
else if(encodeTypeName == "AUSTRALIA_POST") return 38;
|
|
5353
|
+
|
|
5354
|
+
else if(encodeTypeName == "POSTNET") return 39;
|
|
5355
|
+
|
|
5356
|
+
else if(encodeTypeName == "PLANET") return 40;
|
|
5357
|
+
|
|
5358
|
+
else if(encodeTypeName == "ONE_CODE") return 41;
|
|
5359
|
+
|
|
5360
|
+
else if(encodeTypeName == "RM_4_SCC") return 42;
|
|
5361
|
+
|
|
5362
|
+
else if(encodeTypeName == "MAILMARK") return 66;
|
|
5363
|
+
|
|
5364
|
+
else if(encodeTypeName == "DATABAR_OMNI_DIRECTIONAL") return 43;
|
|
5365
|
+
|
|
5366
|
+
else if(encodeTypeName == "DATABAR_TRUNCATED") return 44;
|
|
5367
|
+
|
|
5368
|
+
else if(encodeTypeName == "DATABAR_LIMITED") return 45;
|
|
5369
|
+
|
|
5370
|
+
else if(encodeTypeName == "DATABAR_EXPANDED") return 46;
|
|
5371
|
+
|
|
5372
|
+
else if(encodeTypeName == "DATABAR_EXPANDED_STACKED") return 52;
|
|
5373
|
+
|
|
5374
|
+
else if(encodeTypeName == "DATABAR_STACKED") return 53;
|
|
5375
|
+
|
|
5376
|
+
else if(encodeTypeName == "DATABAR_STACKED_OMNI_DIRECTIONAL") return 54;
|
|
5377
|
+
|
|
5378
|
+
else if(encodeTypeName == "SINGAPORE_POST") return 47;
|
|
5379
|
+
|
|
5380
|
+
else if(encodeTypeName == "AUSTRALIAN_POSTE_PARCEL") return 49;
|
|
5381
|
+
|
|
5382
|
+
else if(encodeTypeName == "SWISS_POST_PARCEL") return 50;
|
|
5383
|
+
|
|
5384
|
+
else if(encodeTypeName == "PATCH_CODE") return 51;
|
|
5385
|
+
|
|
5386
|
+
else if(encodeTypeName == "CODE_32") return 58;
|
|
5387
|
+
|
|
5388
|
+
else if(encodeTypeName == "DATA_LOGIC_2_OF_5") return 59;
|
|
5389
|
+
|
|
5390
|
+
else if(encodeTypeName == "DUTCH_KIX") return 61;
|
|
5391
|
+
|
|
5392
|
+
else if(encodeTypeName == "UPCA_GS_1_CODE_128_COUPON") return 62;
|
|
5393
|
+
|
|
5394
|
+
else if(encodeTypeName == "UPCA_GS_1_DATABAR_COUPON") return 63;
|
|
5395
|
+
|
|
5396
|
+
else if(encodeTypeName == "CODABLOCK_F") return 64;
|
|
5397
|
+
|
|
5398
|
+
else if(encodeTypeName == "GS_1_CODABLOCK_F") return 65;
|
|
5399
|
+
|
|
5400
|
+
else if(encodeTypeName == "GS_1_COMPOSITE_BAR") return 67;
|
|
5401
|
+
|
|
5402
|
+
else if(encodeTypeName == "HIBC_CODE_39_LIC") return 68;
|
|
5403
|
+
|
|
5404
|
+
else if(encodeTypeName == "HIBC_CODE_128_LIC") return 69;
|
|
5405
|
+
|
|
5406
|
+
else if(encodeTypeName == "HIBC_AZTEC_LIC") return 70;
|
|
5407
|
+
|
|
5408
|
+
else if(encodeTypeName == "HIBC_DATA_MATRIX_LIC") return 71;
|
|
5409
|
+
|
|
5410
|
+
else if(encodeTypeName == "HIBCQRLIC") return 72;
|
|
5411
|
+
|
|
5412
|
+
else if(encodeTypeName == "HIBC_CODE_39_PAS") return 73;
|
|
5413
|
+
|
|
5414
|
+
else if(encodeTypeName == "HIBC_CODE_128_PAS") return 74;
|
|
5415
|
+
|
|
5416
|
+
else if(encodeTypeName == "HIBC_AZTEC_PAS") return 75;
|
|
5417
|
+
|
|
5418
|
+
else if(encodeTypeName == "HIBC_DATA_MATRIX_PAS") return 76;
|
|
5419
|
+
|
|
5420
|
+
else if(encodeTypeName == "HIBCQRPAS") return 77;
|
|
5421
|
+
|
|
5422
|
+
else if(encodeTypeName == "GS_1_DOT_CODE") return 78;
|
|
5423
|
+
|
|
5424
|
+
else return -1;
|
|
5425
|
+
}
|
|
5426
|
+
}
|
|
4977
5427
|
|
|
4978
5428
|
/**
|
|
4979
5429
|
* Macro Characters 05 and 06 values are used to obtain more compact encoding in special modes.
|
|
@@ -5509,6 +5959,87 @@ MaxiCodeMode =
|
|
|
5509
5959
|
MODE_6: 6
|
|
5510
5960
|
}
|
|
5511
5961
|
|
|
5962
|
+
/**
|
|
5963
|
+
* <p>
|
|
5964
|
+
* Encoding mode for DotCode barcodes.
|
|
5965
|
+
* </p><p><hr><blockquote><pre>
|
|
5966
|
+
* <pre>
|
|
5967
|
+
* //Auto mode with macros
|
|
5968
|
+
* let codetext = ""[)>\u001E05\u001DCodetextWithMacros05\u001E\u0004"";
|
|
5969
|
+
* let generator = new BarcodeGenerator(EncodeTypes.DOT_CODE, codetext);
|
|
5970
|
+
* {
|
|
5971
|
+
* generator.save("test.bmp", BarCodeImageFormat.BMP);
|
|
5972
|
+
* }
|
|
5973
|
+
*
|
|
5974
|
+
* //Auto mode
|
|
5975
|
+
* let codetext = "犬Right狗";
|
|
5976
|
+
* let generator = new BarcodeGenerator(EncodeTypes.DOT_CODE, codetext);
|
|
5977
|
+
* {
|
|
5978
|
+
* generator.getParameters().getBarcode().getDotCode().setECIEncoding(ECIEncodings.UTF8);
|
|
5979
|
+
* generator.save("test.bmp", BarCodeImageFormat.BMP);
|
|
5980
|
+
* }
|
|
5981
|
+
*
|
|
5982
|
+
* //Bytes mode
|
|
5983
|
+
* let encodedArr = array( 0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9 );
|
|
5984
|
+
* //encode array to string
|
|
5985
|
+
* let codetext = "";
|
|
5986
|
+
* encodedArr.forEach(function(bval, i, bvals)
|
|
5987
|
+
* codetext += bval;
|
|
5988
|
+
* let generator = new BarcodeGenerator(EncodeTypes.DOT_CODE, codetext);
|
|
5989
|
+
* {
|
|
5990
|
+
* generator.getParameters().getBarcode().getDotCode().setDotCodeEncodeMode(DotCodeEncodeMode.BYTES);
|
|
5991
|
+
* generator.save("test.bmp", BarCodeImageFormat.BMP);
|
|
5992
|
+
* }
|
|
5993
|
+
* //Extended codetext mode
|
|
5994
|
+
* //create codetext
|
|
5995
|
+
* let textBuilder = new DotCodeExtCodetextBuilder();
|
|
5996
|
+
* textBuilder.addFNC1FormatIdentifier();
|
|
5997
|
+
* textBuilder.addECICodetext(ECIEncodings.Win1251, "Will");
|
|
5998
|
+
* textBuilder.addFNC1FormatIdentifier();
|
|
5999
|
+
* textBuilder.addECICodetext(ECIEncodings.UTF8, "犬Right狗");
|
|
6000
|
+
* textBuilder.addFNC3SymbolSeparator();
|
|
6001
|
+
* textBuilder.addFNC1FormatIdentifier();
|
|
6002
|
+
* textBuilder.addECICodetext(ECIEncodings.UTF16BE, "犬Power狗");
|
|
6003
|
+
* textBuilder.addPlainCodetext("Plain text");
|
|
6004
|
+
* //generate codetext
|
|
6005
|
+
* let codetext = textBuilder.getExtendedCodetext();
|
|
6006
|
+
* //generate
|
|
6007
|
+
* let generator = new BarcodeGenerator(EncodeTypes.DOT_CODE, codetext);
|
|
6008
|
+
* {
|
|
6009
|
+
* generator.getParameters().getBarcode().getDotCode().setDotCodeEncodeMode(DotCodeEncodeMode.EXTENDED_CODETEXT);
|
|
6010
|
+
* generator.save("test.bmp", BarCodeImageFormat.BMP);
|
|
6011
|
+
* }
|
|
6012
|
+
* </pre>
|
|
6013
|
+
* </pre></blockquote></hr></p>
|
|
6014
|
+
*/
|
|
6015
|
+
DotCodeEncodeMode =
|
|
6016
|
+
{
|
|
6017
|
+
/**
|
|
6018
|
+
* <p>
|
|
6019
|
+
* Encode codetext with value set in the ECIEncoding property.
|
|
6020
|
+
* </p>
|
|
6021
|
+
*/
|
|
6022
|
+
AUTO: 0,
|
|
6023
|
+
|
|
6024
|
+
/**
|
|
6025
|
+
* <p>
|
|
6026
|
+
* Encode codetext as plain bytes. If it detects any Unicode character, the character will be encoded as two bytes, lower byte first.
|
|
6027
|
+
* </p>
|
|
6028
|
+
*/
|
|
6029
|
+
BYTES: 1,
|
|
6030
|
+
|
|
6031
|
+
/**
|
|
6032
|
+
* <p>
|
|
6033
|
+
* <p>Extended mode which supports multi ECI modes.</p>
|
|
6034
|
+
* <p>It is better to use DotCodeExtCodetextBuilder for extended codetext generation.</p>
|
|
6035
|
+
* <p>Use Display2DText property to set visible text to removing managing characters.</p>
|
|
6036
|
+
* <p>ECI identifiers are set as single slash and six digits identifier "\000026" - UTF8 ECI identifier</p>
|
|
6037
|
+
* <p>All unicode characters after ECI identifier are automatically encoded into correct character codeset.</p>
|
|
6038
|
+
* </p>
|
|
6039
|
+
*/
|
|
6040
|
+
EXTENDED_CODETEXT: 2
|
|
6041
|
+
}
|
|
6042
|
+
|
|
5512
6043
|
module.exports = {
|
|
5513
6044
|
BarcodeGenerator,
|
|
5514
6045
|
EncodeTypes,
|
|
@@ -5568,5 +6099,7 @@ module.exports = {
|
|
|
5568
6099
|
TwoDComponentType,
|
|
5569
6100
|
GS1CompositeBarParameters,
|
|
5570
6101
|
Pdf417MacroTerminator,
|
|
5571
|
-
MaxiCodeExtCodetextBuilder
|
|
6102
|
+
MaxiCodeExtCodetextBuilder,
|
|
6103
|
+
DotCodeExtCodetextBuilder,
|
|
6104
|
+
DotCodeEncodeMode
|
|
5572
6105
|
};
|