aspose.barcode 23.7.0 → 23.8.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.
|
@@ -186,24 +186,6 @@ class BarCodeReaderExamples
|
|
|
186
186
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
howToDetectEncodingEnabled()
|
|
190
|
-
{
|
|
191
|
-
console.log("\n---\nfunction '" + this.howToDetectEncodingEnabled.name + "'\n");
|
|
192
|
-
let gen = new BarcodeGenerator(EncodeTypes.QR, null);
|
|
193
|
-
gen.setCodeText("Слово");
|
|
194
|
-
gen.getParameters().getBarcode().getQR().setCodeTextEncoding("UTF-8");
|
|
195
|
-
let image = gen.generateBarCodeImage(aspose_barcode.BarCodeImageFormat.PNG);
|
|
196
|
-
|
|
197
|
-
let reader = new BarCodeReader((image), null, DecodeType.QR);
|
|
198
|
-
reader.setDetectEncoding(true);
|
|
199
|
-
reader.readBarCodes().forEach(function (result, i, results)
|
|
200
|
-
{
|
|
201
|
-
console.log("CodeText : " + result.getCodeText());
|
|
202
|
-
|
|
203
|
-
console.log("CodeType : " + result.getCodeTypeName());
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
|
|
207
189
|
howToCustomerInformationInterpretingType1()
|
|
208
190
|
{
|
|
209
191
|
console.log("\n---\nfunction '" + this.howToCustomerInformationInterpretingType1.name + "'\n");
|
|
@@ -215,7 +197,7 @@ class BarCodeReaderExamples
|
|
|
215
197
|
generator.getParameters().getImageHeight().setPixels(150);
|
|
216
198
|
let image = generator.generateBarCodeImage(aspose_barcode.BarCodeImageFormat.PNG);
|
|
217
199
|
let reader = new BarCodeReader(image, null, DecodeType.AUSTRALIA_POST);
|
|
218
|
-
reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.N_TABLE);
|
|
200
|
+
reader.getBarcodeSettings().getAustraliaPost().setCustomerInformationInterpretingType(CustomerInformationInterpretingType.N_TABLE);
|
|
219
201
|
reader.readBarCodes().forEach(function (result, i, results)
|
|
220
202
|
{
|
|
221
203
|
console.log("CodeText : " + result.getCodeText());
|
|
@@ -234,7 +216,7 @@ class BarCodeReaderExamples
|
|
|
234
216
|
generator.getParameters().getImageHeight().setPixels(150);
|
|
235
217
|
let image = generator.generateBarCodeImage(aspose_barcode.BarCodeImageFormat.PNG);
|
|
236
218
|
let reader = new BarCodeReader(image, null, DecodeType.AUSTRALIA_POST);
|
|
237
|
-
reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.C_TABLE);
|
|
219
|
+
reader.getBarcodeSettings().getAustraliaPost().setCustomerInformationInterpretingType(CustomerInformationInterpretingType.C_TABLE);
|
|
238
220
|
reader.readBarCodes().forEach(function (result, i, results)
|
|
239
221
|
{
|
|
240
222
|
console.log("CodeText : " + result.getCodeText());
|
|
@@ -255,6 +237,5 @@ barCodeReaderExamples.howToRecognitionCodeAllSupportedTypes();
|
|
|
255
237
|
barCodeReaderExamples.howToRecognitionCodeAllSupportedTypes2();
|
|
256
238
|
barCodeReaderExamples.howToRecognitionSetBarCodeImage();
|
|
257
239
|
barCodeReaderExamples.howToMacroPdf417();
|
|
258
|
-
barCodeReaderExamples.howToDetectEncodingEnabled();
|
|
259
240
|
barCodeReaderExamples.howToCustomerInformationInterpretingType1();
|
|
260
241
|
barCodeReaderExamples.howToCustomerInformationInterpretingType2();
|
package/lib/AsposeBarcode.js
CHANGED
|
@@ -4,7 +4,7 @@ const joint_ = require('./Joint');
|
|
|
4
4
|
const complexbarcode_ = require("./ComplexBarcode");
|
|
5
5
|
const generation_ = require("./Generation");
|
|
6
6
|
const recognition_ = require("./Recognition");
|
|
7
|
-
const jar_name_ = "/aspose-barcode-nodejs-23.
|
|
7
|
+
const jar_name_ = "/aspose-barcode-nodejs-23.8.jar";
|
|
8
8
|
const jar_path_ = __dirname + jar_name_;
|
|
9
9
|
const fs = require("fs");
|
|
10
10
|
|
package/lib/ComplexBarcode.js
CHANGED
|
@@ -577,6 +577,8 @@ class ComplexCodetextReader {
|
|
|
577
577
|
let javaHIBCLICCombinedCodetextClass = java.import(HIBCLICCombinedCodetext.JAVA_CLASS_NAME);
|
|
578
578
|
let javaNodeJsComplexCodetextReaderJavaClass = java.import(ComplexCodetextReader.javaClassName);
|
|
579
579
|
let hibclicComplexCodetext = javaNodeJsComplexCodetextReaderJavaClass.tryDecodeHIBCLICSync(encodedCodetext);
|
|
580
|
+
if(hibclicComplexCodetext == null)
|
|
581
|
+
return null;
|
|
580
582
|
if(hibclicComplexCodetext.getClassSync().equalsSync(javaHIBCLICSecondaryAndAdditionalDataCodetextClass.class))
|
|
581
583
|
{
|
|
582
584
|
return HIBCLICSecondaryAndAdditionalDataCodetext.construct(hibclicComplexCodetext);
|
|
@@ -2799,10 +2801,10 @@ class HIBCPASCodetext extends IComplexCodetext
|
|
|
2799
2801
|
{
|
|
2800
2802
|
let _array = [];
|
|
2801
2803
|
let mwRecordsList = this.getJavaClass().getRecordsSync();
|
|
2802
|
-
let listSize = mwRecordsList.
|
|
2804
|
+
let listSize = mwRecordsList.sizeSync();
|
|
2803
2805
|
for (let i = 0; i < listSize; i++)
|
|
2804
2806
|
{
|
|
2805
|
-
let mwhibcpasRecord = mwRecordsList.
|
|
2807
|
+
let mwhibcpasRecord = mwRecordsList.getSync(i);
|
|
2806
2808
|
_array.push(HIBCPASRecord.construct(mwhibcpasRecord));
|
|
2807
2809
|
}
|
|
2808
2810
|
return _array;
|
|
@@ -2929,7 +2931,7 @@ class HIBCPASRecord extends joint.BaseJavaClass
|
|
|
2929
2931
|
*/
|
|
2930
2932
|
static construct(javaClass)
|
|
2931
2933
|
{
|
|
2932
|
-
let obj = new HIBCPASRecord(0,
|
|
2934
|
+
let obj = new HIBCPASRecord(0,"");
|
|
2933
2935
|
obj.setJavaClass(javaClass);
|
|
2934
2936
|
return obj;
|
|
2935
2937
|
}
|
package/lib/Generation.js
CHANGED
|
@@ -4297,6 +4297,201 @@ class DataMatrixExtCodetextBuilder extends ExtCodetextBuilder
|
|
|
4297
4297
|
}
|
|
4298
4298
|
}
|
|
4299
4299
|
|
|
4300
|
+
/**
|
|
4301
|
+
* <p>
|
|
4302
|
+
* <p>Extended codetext generator for Han Xin Code for Extended Mode of HanXinEncodeMode</p>
|
|
4303
|
+
* </p><p><hr><blockquote><pre>
|
|
4304
|
+
* <pre>
|
|
4305
|
+
*
|
|
4306
|
+
* //Extended codetext mode
|
|
4307
|
+
* //create codetext
|
|
4308
|
+
* let codeTextBuilder = new HanXinExtCodetextBuilder();
|
|
4309
|
+
* codeTextBuilder.addGB18030TwoByte("漄");
|
|
4310
|
+
* codeTextBuilder.addGB18030FourByte("㐁");
|
|
4311
|
+
* codeTextBuilder.addCommonChineseRegionOne("全");
|
|
4312
|
+
* codeTextBuilder.addCommonChineseRegionTwo("螅");
|
|
4313
|
+
* codeTextBuilder.addNumeric("123");
|
|
4314
|
+
* codeTextBuilder.addText("qwe");
|
|
4315
|
+
* codeTextBuilder.addUnicode("ıntəˈnæʃənəl");
|
|
4316
|
+
* codeTextBuilder.addECI("ΑΒΓΔΕ", 9);
|
|
4317
|
+
* codeTextBuilder.addAuto("abc");
|
|
4318
|
+
* codeTextBuilder.addBinary("abc");
|
|
4319
|
+
* codeTextBuilder.addURI("backslashes_should_be_doubled\000555:test");
|
|
4320
|
+
* codeTextBuilder.addGS1("(01)03453120000011(17)191125(10)ABCD1234(21)10");
|
|
4321
|
+
* let expectedStr = "漄㐁全螅123qweıntəˈnæʃənəlΑΒΓΔΕabcabcbackslashes_should_be_doubled\000555:test(01)03453120000011(17)191125(10)ABCD1234(21)10";
|
|
4322
|
+
* //generate codetext
|
|
4323
|
+
* let str = codeTextBuilder.getExtendedCodetext();
|
|
4324
|
+
* //generate
|
|
4325
|
+
* let bg = new BarcodeGenerator(EncodeTypes.HAN_XIN, str);
|
|
4326
|
+
* bg.getParameters().getBarcode().getHanXin().setHanXinEncodeMode(HanXinEncodeMode.EXTENDED);
|
|
4327
|
+
* let img = bg.generateBarCodeImage(BarcodeImageFormat.PNG);
|
|
4328
|
+
* let r = new BarCodeReader(img, null, DecodeType.HAN_XIN))
|
|
4329
|
+
* let found = r.readBarCodes();
|
|
4330
|
+
* assert.assertEquals(1, found.length);
|
|
4331
|
+
* assert.assertEquals(expectedStr, found[0].getCodeText());
|
|
4332
|
+
* </pre>
|
|
4333
|
+
* </pre></blockquote></hr></p>
|
|
4334
|
+
*/
|
|
4335
|
+
class HanXinExtCodetextBuilder extends joint.BaseJavaClass
|
|
4336
|
+
{
|
|
4337
|
+
static JAVA_CLASS_NAME = "com.aspose.mw.barcode.generation.MwHanXinExtCodetextBuilder";
|
|
4338
|
+
|
|
4339
|
+
constructor()
|
|
4340
|
+
{
|
|
4341
|
+
let java_class_link = java.import(HanXinExtCodetextBuilder.JAVA_CLASS_NAME);
|
|
4342
|
+
let javaClass = new java_class_link();
|
|
4343
|
+
super(javaClass);
|
|
4344
|
+
}
|
|
4345
|
+
|
|
4346
|
+
init()
|
|
4347
|
+
{
|
|
4348
|
+
}
|
|
4349
|
+
|
|
4350
|
+
/**
|
|
4351
|
+
* <p>
|
|
4352
|
+
* Adds codetext fragment in ECI mode
|
|
4353
|
+
* </p>
|
|
4354
|
+
* @param text Codetext string
|
|
4355
|
+
* @param encoding ECI encoding in number format
|
|
4356
|
+
*/
|
|
4357
|
+
addECI(text, encoding)
|
|
4358
|
+
{
|
|
4359
|
+
this.getJavaClass().addECISync(text, encoding);
|
|
4360
|
+
}
|
|
4361
|
+
|
|
4362
|
+
/**
|
|
4363
|
+
* <p>
|
|
4364
|
+
* Adds codetext fragment in Auto mode
|
|
4365
|
+
* </p>
|
|
4366
|
+
* @param text Codetext string
|
|
4367
|
+
*/
|
|
4368
|
+
addAuto(text)
|
|
4369
|
+
{
|
|
4370
|
+
this.getJavaClass().addAutoSync(text);
|
|
4371
|
+
}
|
|
4372
|
+
|
|
4373
|
+
/**
|
|
4374
|
+
* <p>
|
|
4375
|
+
* Adds codetext fragment in Binary mode
|
|
4376
|
+
* </p>
|
|
4377
|
+
* @param text Codetext string
|
|
4378
|
+
*/
|
|
4379
|
+
addBinary(text)
|
|
4380
|
+
{
|
|
4381
|
+
this.getJavaClass().addBinarySync(text);
|
|
4382
|
+
}
|
|
4383
|
+
|
|
4384
|
+
/**
|
|
4385
|
+
* <p>
|
|
4386
|
+
* Adds codetext fragment in URI mode
|
|
4387
|
+
* </p>
|
|
4388
|
+
* @param text Codetext string
|
|
4389
|
+
*/
|
|
4390
|
+
addURI(text)
|
|
4391
|
+
{
|
|
4392
|
+
this.getJavaClass().addURISync(text);
|
|
4393
|
+
}
|
|
4394
|
+
|
|
4395
|
+
/**
|
|
4396
|
+
* <p>
|
|
4397
|
+
* Adds codetext fragment in Text mode
|
|
4398
|
+
* </p>
|
|
4399
|
+
* @param text Codetext string
|
|
4400
|
+
*/
|
|
4401
|
+
addText(text)
|
|
4402
|
+
{
|
|
4403
|
+
this.getJavaClass().addTextSync(text);
|
|
4404
|
+
}
|
|
4405
|
+
|
|
4406
|
+
/**
|
|
4407
|
+
* <p>
|
|
4408
|
+
* Adds codetext fragment in Numeric mode
|
|
4409
|
+
* </p>
|
|
4410
|
+
* @param text Codetext string
|
|
4411
|
+
*/
|
|
4412
|
+
addNumeric(text)
|
|
4413
|
+
{
|
|
4414
|
+
this.getJavaClass().addNumericSync(text);
|
|
4415
|
+
}
|
|
4416
|
+
|
|
4417
|
+
/**
|
|
4418
|
+
* <p>
|
|
4419
|
+
* Adds codetext fragment in Unicode mode
|
|
4420
|
+
* </p>
|
|
4421
|
+
* @param text Codetext string
|
|
4422
|
+
*/
|
|
4423
|
+
addUnicode(text)
|
|
4424
|
+
{
|
|
4425
|
+
this.getJavaClass().addUnicodeSync(text);
|
|
4426
|
+
}
|
|
4427
|
+
|
|
4428
|
+
/**
|
|
4429
|
+
* <p>
|
|
4430
|
+
* Adds codetext fragment in Common Chinese Region One mode
|
|
4431
|
+
* </p>
|
|
4432
|
+
* @param text Codetext string
|
|
4433
|
+
*/
|
|
4434
|
+
addCommonChineseRegionOne(text)
|
|
4435
|
+
{
|
|
4436
|
+
this.getJavaClass().addCommonChineseRegionOneSync(text);
|
|
4437
|
+
}
|
|
4438
|
+
|
|
4439
|
+
/**
|
|
4440
|
+
* <p>
|
|
4441
|
+
* Adds codetext fragment in Common Chinese Region Two mode
|
|
4442
|
+
* </p>
|
|
4443
|
+
* @param text Codetext string
|
|
4444
|
+
*/
|
|
4445
|
+
addCommonChineseRegionTwo(text)
|
|
4446
|
+
{
|
|
4447
|
+
this.getJavaClass().addCommonChineseRegionTwoSync(text);
|
|
4448
|
+
}
|
|
4449
|
+
|
|
4450
|
+
/**
|
|
4451
|
+
* <p>
|
|
4452
|
+
* Adds codetext fragment in GB18030 Two Byte mode
|
|
4453
|
+
* </p>
|
|
4454
|
+
* @param text Codetext string
|
|
4455
|
+
*/
|
|
4456
|
+
addGB18030TwoByte(text)
|
|
4457
|
+
{
|
|
4458
|
+
this.getJavaClass().addGB18030TwoByteSync(text);
|
|
4459
|
+
}
|
|
4460
|
+
|
|
4461
|
+
/**
|
|
4462
|
+
* <p>
|
|
4463
|
+
* Adds codetext fragment in GB18030 Four Byte mode
|
|
4464
|
+
* </p>
|
|
4465
|
+
* @param text Codetext string
|
|
4466
|
+
*/
|
|
4467
|
+
addGB18030FourByte(text)
|
|
4468
|
+
{
|
|
4469
|
+
this.getJavaClass().addGB18030FourByteSync(text);
|
|
4470
|
+
}
|
|
4471
|
+
|
|
4472
|
+
/**
|
|
4473
|
+
* <p>
|
|
4474
|
+
* Adds codetext fragment in GS1 mode
|
|
4475
|
+
* </p>
|
|
4476
|
+
* @param text Codetext string
|
|
4477
|
+
*/
|
|
4478
|
+
addGS1(text)
|
|
4479
|
+
{
|
|
4480
|
+
this.getJavaClass().addGS1Sync(text);
|
|
4481
|
+
}
|
|
4482
|
+
|
|
4483
|
+
/**
|
|
4484
|
+
* <p>
|
|
4485
|
+
* Returns codetext from Extended mode codetext builder
|
|
4486
|
+
* </p>
|
|
4487
|
+
* @return Codetext in Extended mode
|
|
4488
|
+
*/
|
|
4489
|
+
getExtendedCodetext()
|
|
4490
|
+
{
|
|
4491
|
+
return this.getJavaClass().getExtendedCodetextSync();
|
|
4492
|
+
}
|
|
4493
|
+
}
|
|
4494
|
+
|
|
4300
4495
|
/**
|
|
4301
4496
|
* Enable checksum validation during recognition for 1D barcodes.<br>
|
|
4302
4497
|
* Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible.<br>
|
|
@@ -7723,5 +7918,6 @@ module.exports = {
|
|
|
7723
7918
|
Code128EncodeMode,
|
|
7724
7919
|
HanXinParameters,
|
|
7725
7920
|
DataMatrixVersion,
|
|
7726
|
-
DataMatrixExtCodetextBuilder
|
|
7921
|
+
DataMatrixExtCodetextBuilder,
|
|
7922
|
+
HanXinExtCodetextBuilder
|
|
7727
7923
|
};
|
package/lib/Recognition.js
CHANGED
|
@@ -891,21 +891,24 @@ class Pdf417ExtendedParameters extends joint.BaseJavaClass
|
|
|
891
891
|
}
|
|
892
892
|
|
|
893
893
|
/**
|
|
894
|
-
*
|
|
895
|
-
*
|
|
894
|
+
* <p>
|
|
895
|
+
* Used to instruct the reader to interpret the data contained within the symbol as programming for reader initialization.
|
|
896
|
+
* </p>
|
|
897
|
+
*
|
|
898
|
+
* @return Reader initialization flag
|
|
896
899
|
*/
|
|
897
|
-
|
|
900
|
+
isReaderInitialization()
|
|
898
901
|
{
|
|
899
|
-
return this.getJavaClass().
|
|
902
|
+
return this.getJavaClass().isReaderInitializationSync();
|
|
900
903
|
}
|
|
901
904
|
|
|
902
905
|
/**
|
|
903
|
-
*
|
|
904
|
-
*
|
|
906
|
+
* <p>Used to instruct the reader to interpret the data contained within the symbol as programming for reader initialization.</p>
|
|
907
|
+
* @return Reader initialization flag
|
|
905
908
|
*/
|
|
906
|
-
|
|
909
|
+
getMacroPdf417Terminator()
|
|
907
910
|
{
|
|
908
|
-
return this.getJavaClass().
|
|
911
|
+
return this.getJavaClass().getMacroPdf417TerminatorSync();
|
|
909
912
|
}
|
|
910
913
|
|
|
911
914
|
/**
|
|
@@ -2168,6 +2171,28 @@ class QualitySettings extends joint.BaseJavaClass
|
|
|
2168
2171
|
}
|
|
2169
2172
|
}
|
|
2170
2173
|
|
|
2174
|
+
/**
|
|
2175
|
+
* <p>
|
|
2176
|
+
* Allows engine using additional image restorations to recognize corrupted barcodes. At this time, it is used only in MicroPdf417 barcode type.
|
|
2177
|
+
* </p>Value:
|
|
2178
|
+
* Allows engine using additional image restorations to recognize corrupted barcodes.
|
|
2179
|
+
*/
|
|
2180
|
+
getAllowAdditionalRestorations()
|
|
2181
|
+
{
|
|
2182
|
+
return this.getJavaClass().getAllowAdditionalRestorationsSync();
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
/**
|
|
2186
|
+
* <p>
|
|
2187
|
+
* Allows engine using additional image restorations to recognize corrupted barcodes. At this time, it is used only in MicroPdf417 barcode type.
|
|
2188
|
+
* </p>Value:
|
|
2189
|
+
* Allows engine using additional image restorations to recognize corrupted barcodes.
|
|
2190
|
+
*/
|
|
2191
|
+
setAllowAdditionalRestorations(value)
|
|
2192
|
+
{
|
|
2193
|
+
this.getJavaClass().setAllowAdditionalRestorationsSync(value);
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2171
2196
|
/**
|
|
2172
2197
|
* Allows engine for Postal barcodes to recognize slightly noised images. Mode helps to recognize sligtly damaged Postal barcodes.
|
|
2173
2198
|
*/
|
|
Binary file
|