aspose.barcode 24.4.0 → 24.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/Generation.js +321 -167
- package/lib/Joint.js +84 -7
- package/lib/Recognition.js +175 -235
- package/lib/{aspose-barcode-nodejs-24.4.jar → aspose-barcode-nodejs-24.6.jar} +0 -0
- package/package.json +1 -1
package/lib/Recognition.js
CHANGED
|
@@ -31,55 +31,21 @@ class BarCodeReader extends joint.BaseJavaClass
|
|
|
31
31
|
* @param rectangles array of object by type Rectangle
|
|
32
32
|
* @param decodeTypes the array of objects by DecodeType
|
|
33
33
|
*/
|
|
34
|
-
constructor(image,
|
|
34
|
+
constructor(image, areas, decodeTypes)
|
|
35
35
|
{
|
|
36
|
-
if (image != null)
|
|
37
|
-
{
|
|
38
|
-
if (joint.isPath(image))
|
|
39
|
-
{
|
|
40
|
-
image = joint.convertResourceToBase64String(image);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
if (rectangles != null)
|
|
44
|
-
{
|
|
45
|
-
if (!Array.isArray(rectangles))
|
|
46
|
-
{
|
|
47
|
-
rectangles = [rectangles];
|
|
48
|
-
}
|
|
49
|
-
for (let i = 0; i < rectangles.length; i++)
|
|
50
|
-
{
|
|
51
|
-
if(!(rectangles[i] instanceof Rectangle))
|
|
52
|
-
throw new Error("Invalid arguments");
|
|
53
|
-
rectangles[i] = rectangles[i].toString();
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
if (decodeTypes === undefined || decodeTypes == null)
|
|
57
|
-
{
|
|
58
|
-
decodeTypes = DecodeType.ALL_SUPPORTED_TYPES
|
|
59
|
-
}
|
|
60
|
-
if (!Array.isArray(decodeTypes))
|
|
61
|
-
{
|
|
62
|
-
decodeTypes = [decodeTypes];
|
|
63
|
-
}
|
|
64
|
-
for (let i = 0; i < decodeTypes.length; i++)
|
|
65
|
-
{
|
|
66
|
-
decodeTypes[i] = decodeTypes[i] + "";
|
|
67
|
-
}
|
|
68
36
|
try
|
|
69
37
|
{
|
|
38
|
+
let stringFormattedAreas = joint.convertAreasToStringFormattedAreas(areas);
|
|
39
|
+
let decodeTypesArray = joint.convertDecodeTypeToFormattedDecodeType(decodeTypes);
|
|
40
|
+
|
|
41
|
+
let base64Image = joint.convertImageResourceToBase64(image);
|
|
42
|
+
|
|
70
43
|
let java_class_link = new java.import(BarCodeReader.javaClassName);
|
|
71
|
-
let java_class =
|
|
72
|
-
if (image == null && rectangles == null && image == null)
|
|
73
|
-
{
|
|
74
|
-
java_class = new java_class_link();
|
|
75
|
-
}
|
|
76
|
-
else
|
|
77
|
-
{
|
|
78
|
-
java_class = new java_class_link(image, rectangles, decodeTypes);
|
|
79
|
-
}
|
|
44
|
+
let java_class = new java_class_link(base64Image, stringFormattedAreas, decodeTypesArray);
|
|
80
45
|
super(java_class);
|
|
81
46
|
this.init()
|
|
82
|
-
}
|
|
47
|
+
}
|
|
48
|
+
catch (e)
|
|
83
49
|
{
|
|
84
50
|
console.error("Invalid arguments");
|
|
85
51
|
throw e;
|
|
@@ -142,7 +108,7 @@ class BarCodeReader extends joint.BaseJavaClass
|
|
|
142
108
|
init()
|
|
143
109
|
{
|
|
144
110
|
this.qualitySettings = new QualitySettings(this.getJavaClass().getQualitySettingsSync());
|
|
145
|
-
this.barcodeSettings = BarcodeSettings
|
|
111
|
+
this.barcodeSettings = new BarcodeSettings(this.getJavaClass().getBarcodeSettingsSync());
|
|
146
112
|
}
|
|
147
113
|
|
|
148
114
|
/**
|
|
@@ -359,38 +325,15 @@ class BarCodeReader extends joint.BaseJavaClass
|
|
|
359
325
|
* console.log("BarCode Type: " + result.getCodeTypeName());
|
|
360
326
|
* console.log("BarCode CodeText: " + result.getCodeText());
|
|
361
327
|
* });
|
|
362
|
-
* @param
|
|
328
|
+
* @param imageResource The image for recognition.
|
|
363
329
|
* @param areas areas list for recognition
|
|
364
330
|
* @throws BarcodeException
|
|
365
331
|
*/
|
|
366
|
-
setBarCodeImage(
|
|
332
|
+
setBarCodeImage(imageResource, ...areas)
|
|
367
333
|
{
|
|
368
|
-
|
|
369
|
-
let
|
|
370
|
-
|
|
371
|
-
if (!(areas == null) && areas.length > 0)
|
|
372
|
-
{
|
|
373
|
-
for (let i = 0; i < areas.length; i++)
|
|
374
|
-
{
|
|
375
|
-
if (!(areas[i] == null))
|
|
376
|
-
{
|
|
377
|
-
isAllRectanglesNotNull |= true;
|
|
378
|
-
stringAreas[i] = areas[i].toString();
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
if (!isAllRectanglesNotNull)
|
|
382
|
-
{
|
|
383
|
-
stringAreas = [];
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
if (stringAreas.length == 0)
|
|
387
|
-
{
|
|
388
|
-
this.getJavaClass().setBarCodeImageSync(image);
|
|
389
|
-
}
|
|
390
|
-
else
|
|
391
|
-
{
|
|
392
|
-
this.getJavaClass().setBarCodeImageSync(image, stringAreas);
|
|
393
|
-
}
|
|
334
|
+
let base64Image = joint.convertImageResourceToBase64(imageResource);
|
|
335
|
+
let stringFormattedAreas = joint.convertAreasToStringFormattedAreas(areas);
|
|
336
|
+
this.getJavaClass().setBarCodeImageSync(base64Image, stringFormattedAreas);
|
|
394
337
|
}
|
|
395
338
|
|
|
396
339
|
/**
|
|
@@ -423,7 +366,14 @@ class BarCodeReader extends joint.BaseJavaClass
|
|
|
423
366
|
*/
|
|
424
367
|
getBarCodeDecodeType()
|
|
425
368
|
{
|
|
426
|
-
|
|
369
|
+
let barcodeTypesArray = [];
|
|
370
|
+
let javaDecodeTypes = this.getJavaClass().getBarCodeDecodeTypeSync();
|
|
371
|
+
for(let i = 0; i < javaDecodeTypes.sizeSync(); i++)
|
|
372
|
+
{
|
|
373
|
+
barcodeTypesArray.push(javaDecodeTypes.getSync(i));
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
return barcodeTypesArray;
|
|
427
377
|
}
|
|
428
378
|
|
|
429
379
|
/**
|
|
@@ -1077,7 +1027,7 @@ class Code128ExtendedParameters extends joint.BaseJavaClass
|
|
|
1077
1027
|
let code128DataPortions = [];
|
|
1078
1028
|
for (let i = 0; i < code128DataPortionsValues.length; i++)
|
|
1079
1029
|
{
|
|
1080
|
-
code128DataPortions
|
|
1030
|
+
code128DataPortions.push(new Code128DataPortion(code128DataPortionsValues[i]));
|
|
1081
1031
|
}
|
|
1082
1032
|
return code128DataPortions;
|
|
1083
1033
|
}
|
|
@@ -1394,6 +1344,7 @@ class BarCodeExtendedParameters extends joint.BaseJavaClass
|
|
|
1394
1344
|
_dataMatrixExtendedParameters;
|
|
1395
1345
|
_aztecExtendedParameters;
|
|
1396
1346
|
_gs1CompositeBarExtendedParameters;
|
|
1347
|
+
_codabarExtendedParameters;
|
|
1397
1348
|
|
|
1398
1349
|
constructor(javaclass)
|
|
1399
1350
|
{
|
|
@@ -1413,6 +1364,7 @@ class BarCodeExtendedParameters extends joint.BaseJavaClass
|
|
|
1413
1364
|
this._dataMatrixExtendedParameters = new DataMatrixExtendedParameters(this.getJavaClass().getDataMatrixSync());
|
|
1414
1365
|
this._aztecExtendedParameters = new AztecExtendedParameters(this.getJavaClass().getAztecSync());
|
|
1415
1366
|
this._gs1CompositeBarExtendedParameters = new GS1CompositeBarExtendedParameters(this.getJavaClass().getGS1CompositeBarSync());
|
|
1367
|
+
this._codabarExtendedParameters = new CodabarExtendedParameters(this.getJavaClass().getCodabarSync());
|
|
1416
1368
|
}
|
|
1417
1369
|
|
|
1418
1370
|
/**
|
|
@@ -1474,6 +1426,15 @@ class BarCodeExtendedParameters extends joint.BaseJavaClass
|
|
|
1474
1426
|
return this._gs1CompositeBarExtendedParameters;
|
|
1475
1427
|
}
|
|
1476
1428
|
|
|
1429
|
+
/**
|
|
1430
|
+
* Gets a Codabar additional information{@code CodabarExtendedParameters} of recognized barcode
|
|
1431
|
+
* @return A Codabar additional information{@code CodabarExtendedParameters} of recognized barcode
|
|
1432
|
+
*/
|
|
1433
|
+
getCodabar()
|
|
1434
|
+
{
|
|
1435
|
+
return this._codabarExtendedParameters;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1477
1438
|
/**
|
|
1478
1439
|
* Gets a special data Code128ExtendedParameters of Code128 recognized barcode Value: A special data Code128ExtendedParameters of Code128 recognized barcode
|
|
1479
1440
|
*/
|
|
@@ -1592,33 +1553,17 @@ class BarCodeExtendedParameters extends joint.BaseJavaClass
|
|
|
1592
1553
|
class QualitySettings extends joint.BaseJavaClass
|
|
1593
1554
|
{
|
|
1594
1555
|
|
|
1595
|
-
|
|
1596
|
-
{
|
|
1597
|
-
return "com.aspose.mw.barcode.recognition.MwQualitySettings";
|
|
1598
|
-
}
|
|
1599
|
-
|
|
1600
|
-
constructor(qualitySettings)
|
|
1556
|
+
constructor(javaClass)
|
|
1601
1557
|
{
|
|
1602
|
-
super(
|
|
1603
|
-
if (qualitySettings instanceof QualitySettings)
|
|
1604
|
-
{
|
|
1605
|
-
this.applyAll(qualitySettings);
|
|
1606
|
-
}
|
|
1558
|
+
super(javaClass);
|
|
1607
1559
|
this.init();
|
|
1608
1560
|
}
|
|
1609
1561
|
|
|
1610
|
-
static initQualitySettings(
|
|
1562
|
+
static initQualitySettings()
|
|
1611
1563
|
{
|
|
1612
1564
|
let javaClassName = "com.aspose.mw.barcode.recognition.MwQualitySettings";
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
let QualitySettings = java.import(javaClassName);
|
|
1616
|
-
return new QualitySettings();
|
|
1617
|
-
}
|
|
1618
|
-
else
|
|
1619
|
-
{
|
|
1620
|
-
return qualitySettings;
|
|
1621
|
-
}
|
|
1565
|
+
let QualitySettings = java.import(javaClassName);
|
|
1566
|
+
return QualitySettings;
|
|
1622
1567
|
}
|
|
1623
1568
|
|
|
1624
1569
|
init()
|
|
@@ -1633,7 +1578,7 @@ class QualitySettings extends joint.BaseJavaClass
|
|
|
1633
1578
|
*/
|
|
1634
1579
|
static getHighPerformance()
|
|
1635
1580
|
{
|
|
1636
|
-
let JavaQualitySettings =
|
|
1581
|
+
let JavaQualitySettings = QualitySettings.initQualitySettings();
|
|
1637
1582
|
return new QualitySettings(JavaQualitySettings.getHighPerformanceSync());
|
|
1638
1583
|
}
|
|
1639
1584
|
|
|
@@ -1647,48 +1592,45 @@ class QualitySettings extends joint.BaseJavaClass
|
|
|
1647
1592
|
*/
|
|
1648
1593
|
static getNormalQuality()
|
|
1649
1594
|
{
|
|
1650
|
-
let JavaQualitySettings =
|
|
1595
|
+
let JavaQualitySettings = QualitySettings.initQualitySettings();
|
|
1651
1596
|
return new QualitySettings(JavaQualitySettings.getNormalQualitySync());
|
|
1652
1597
|
}
|
|
1653
1598
|
|
|
1654
1599
|
/**
|
|
1655
|
-
*
|
|
1600
|
+
* HighQuality recognition quality preset. This preset is developed for low quality barcodes.
|
|
1656
1601
|
*
|
|
1657
1602
|
* @example
|
|
1658
1603
|
* let reader = new BarCodeReader("test.png");
|
|
1659
|
-
* reader.setQualitySettings(QualitySettings.
|
|
1604
|
+
* reader.setQualitySettings(QualitySettings.getHighQuality());
|
|
1660
1605
|
*/
|
|
1661
|
-
static
|
|
1606
|
+
static getHighQuality()
|
|
1662
1607
|
{
|
|
1663
|
-
let JavaQualitySettings =
|
|
1664
|
-
return new QualitySettings(JavaQualitySettings.
|
|
1608
|
+
let JavaQualitySettings = QualitySettings.initQualitySettings();
|
|
1609
|
+
return new QualitySettings(JavaQualitySettings.getHighQualitySync());
|
|
1665
1610
|
}
|
|
1666
1611
|
|
|
1667
1612
|
/**
|
|
1668
|
-
*
|
|
1669
|
-
*
|
|
1613
|
+
* <p>
|
|
1614
|
+
* MaxQuality recognition quality preset. This preset is developed to recognize all possible barcodes, even incorrect barcodes.
|
|
1615
|
+
* </p><p><hr><blockquote><pre>
|
|
1616
|
+
* This sample shows how to use MaxQuality mode
|
|
1617
|
+
* <pre>
|
|
1670
1618
|
*
|
|
1671
|
-
*
|
|
1672
|
-
*
|
|
1673
|
-
*
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
/**
|
|
1682
|
-
* HighQuality recognition quality preset. This preset is developed for low quality barcodes.
|
|
1619
|
+
* reader = new BarCodeReader("test.png"null, null, DecodeType.CODE_39_EXTENDED, DecodeType.CODE_128);
|
|
1620
|
+
* {
|
|
1621
|
+
* reader.setQualitySettings(QualitySettings.getMaxQuality());
|
|
1622
|
+
* for(let i = 0; i < reader.readBarCodes().length; i++)
|
|
1623
|
+
* echo (reader.getFoundBarcodes()[i].getCodeText());
|
|
1624
|
+
* }
|
|
1625
|
+
* </pre>
|
|
1626
|
+
* </pre></blockquote></hr></p>Value:
|
|
1627
|
+
* MaxQuality recognition quality preset.
|
|
1683
1628
|
*
|
|
1684
|
-
* @example
|
|
1685
|
-
* let reader = new BarCodeReader("test.png");
|
|
1686
|
-
* reader.setQualitySettings(QualitySettings.getHighQuality());
|
|
1687
1629
|
*/
|
|
1688
|
-
static
|
|
1630
|
+
static getMaxQuality()
|
|
1689
1631
|
{
|
|
1690
|
-
let JavaQualitySettings =
|
|
1691
|
-
return new QualitySettings(JavaQualitySettings.
|
|
1632
|
+
let JavaQualitySettings = QualitySettings.initQualitySettings();
|
|
1633
|
+
return new QualitySettings(JavaQualitySettings.getMaxQualitySync());
|
|
1692
1634
|
}
|
|
1693
1635
|
|
|
1694
1636
|
/**
|
|
@@ -1819,23 +1761,6 @@ class QualitySettings extends joint.BaseJavaClass
|
|
|
1819
1761
|
{
|
|
1820
1762
|
this.getJavaClass().setAllowIncorrectBarcodesSync(value);
|
|
1821
1763
|
}
|
|
1822
|
-
|
|
1823
|
-
/**
|
|
1824
|
-
* <p>
|
|
1825
|
-
* Function apply all values from Src setting to Dst
|
|
1826
|
-
* </p>
|
|
1827
|
-
* @param Src source settings
|
|
1828
|
-
*/
|
|
1829
|
-
applyAll(Src)
|
|
1830
|
-
{
|
|
1831
|
-
this.setXDimension(Src.getXDimension());
|
|
1832
|
-
this.setMinimalXDimension(Src.getMinimalXDimension());
|
|
1833
|
-
this.setBarcodeQuality(Src.getBarcodeQuality());
|
|
1834
|
-
this.setDeconvolution(Src.getDeconvolution());
|
|
1835
|
-
this.setInverseImage(Src.getInverseImage());
|
|
1836
|
-
this.setComplexBackground(Src.getComplexBackground());
|
|
1837
|
-
this.setAllowIncorrectBarcodes(Src.getAllowIncorrectBarcodes());
|
|
1838
|
-
}
|
|
1839
1764
|
}
|
|
1840
1765
|
|
|
1841
1766
|
/**
|
|
@@ -1843,30 +1768,17 @@ class QualitySettings extends joint.BaseJavaClass
|
|
|
1843
1768
|
*/
|
|
1844
1769
|
class Code128DataPortion extends joint.BaseJavaClass
|
|
1845
1770
|
{
|
|
1846
|
-
static get javaClassName()
|
|
1847
|
-
{
|
|
1848
|
-
return "com.aspose.mw.barcode.recognition.MwCode128DataPortion";
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
1771
|
/**
|
|
1852
1772
|
* Creates a new instance of the {@code Code128DataPortion} class with start code symbol and decoded codetext.
|
|
1853
|
-
*
|
|
1854
|
-
* @param code128SubType A start encoding symbol
|
|
1855
|
-
* @param data A partial codetext
|
|
1856
1773
|
*/
|
|
1857
|
-
constructor(
|
|
1774
|
+
constructor(javaclass)
|
|
1858
1775
|
{
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
super(code128DataPortion);
|
|
1862
|
-
this.init();
|
|
1776
|
+
super(javaclass);
|
|
1777
|
+
this.init()
|
|
1863
1778
|
}
|
|
1864
1779
|
|
|
1865
|
-
|
|
1780
|
+
init()
|
|
1866
1781
|
{
|
|
1867
|
-
let code128DataPortion = new Code128DataPortion(0, "");
|
|
1868
|
-
code128DataPortion.setJavaClass(javaClass);
|
|
1869
|
-
return code128DataPortion;
|
|
1870
1782
|
}
|
|
1871
1783
|
|
|
1872
1784
|
/**
|
|
@@ -1879,16 +1791,6 @@ class Code128DataPortion extends joint.BaseJavaClass
|
|
|
1879
1791
|
return this.getJavaClass().getDataSync();
|
|
1880
1792
|
}
|
|
1881
1793
|
|
|
1882
|
-
/**
|
|
1883
|
-
* Gets the part of code text related to subtype.
|
|
1884
|
-
*
|
|
1885
|
-
* @return The part of code text related to subtype
|
|
1886
|
-
*/
|
|
1887
|
-
setData(value)
|
|
1888
|
-
{
|
|
1889
|
-
this.getJavaClass().setDataSync(value);
|
|
1890
|
-
}
|
|
1891
|
-
|
|
1892
1794
|
/**
|
|
1893
1795
|
* Gets the type of Code128 subset
|
|
1894
1796
|
*
|
|
@@ -1899,20 +1801,6 @@ class Code128DataPortion extends joint.BaseJavaClass
|
|
|
1899
1801
|
return this.getJavaClass().getCode128SubTypeSync();
|
|
1900
1802
|
}
|
|
1901
1803
|
|
|
1902
|
-
/**
|
|
1903
|
-
* Sets the type of Code128 subset
|
|
1904
|
-
*
|
|
1905
|
-
* @return The type of Code128 subset
|
|
1906
|
-
*/
|
|
1907
|
-
setCode128SubType(value)
|
|
1908
|
-
{
|
|
1909
|
-
this.getJavaClass().setCode128SubTypeSync(value);
|
|
1910
|
-
}
|
|
1911
|
-
|
|
1912
|
-
init()
|
|
1913
|
-
{
|
|
1914
|
-
}
|
|
1915
|
-
|
|
1916
1804
|
/**
|
|
1917
1805
|
* Returns a human-readable string representation of this {@code Code128DataPortion}.
|
|
1918
1806
|
* @return A string that represents this {@code Code128DataPortion}.
|
|
@@ -1984,37 +1872,18 @@ class DataBarExtendedParameters extends joint.BaseJavaClass
|
|
|
1984
1872
|
*/
|
|
1985
1873
|
class AustraliaPostSettings extends joint.BaseJavaClass
|
|
1986
1874
|
{
|
|
1987
|
-
static get javaClassName()
|
|
1988
|
-
{
|
|
1989
|
-
return "com.aspose.mw.barcode.recognition.MwAustraliaPostSettings";
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
|
-
init()
|
|
1993
|
-
{
|
|
1994
|
-
}
|
|
1995
1875
|
|
|
1996
1876
|
/**
|
|
1997
1877
|
* AustraliaPostSettings constructor
|
|
1998
1878
|
*/
|
|
1999
|
-
constructor(
|
|
1879
|
+
constructor(javaclass)
|
|
2000
1880
|
{
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
super(settings.getJavaClass());
|
|
2004
|
-
}
|
|
2005
|
-
else
|
|
2006
|
-
{
|
|
2007
|
-
let java_link = java.import(AustraliaPostSettings.javaClassName);
|
|
2008
|
-
let australiaPostSettings = new java_link();
|
|
2009
|
-
super(australiaPostSettings);
|
|
2010
|
-
}
|
|
1881
|
+
super(javaclass);
|
|
1882
|
+
this.init()
|
|
2011
1883
|
}
|
|
2012
1884
|
|
|
2013
|
-
|
|
1885
|
+
init()
|
|
2014
1886
|
{
|
|
2015
|
-
let australiaPostSettings = new AustraliaPostSettings(null);
|
|
2016
|
-
australiaPostSettings.setJavaClass(javaClass);
|
|
2017
|
-
return australiaPostSettings;
|
|
2018
1887
|
}
|
|
2019
1888
|
|
|
2020
1889
|
/**
|
|
@@ -2091,46 +1960,21 @@ class AustraliaPostSettings extends joint.BaseJavaClass
|
|
|
2091
1960
|
*/
|
|
2092
1961
|
class BarcodeSettings extends joint.BaseJavaClass
|
|
2093
1962
|
{
|
|
2094
|
-
|
|
2095
1963
|
_australiaPost;
|
|
2096
1964
|
|
|
2097
|
-
static get javaClassName()
|
|
2098
|
-
{
|
|
2099
|
-
return "com.aspose.mw.barcode.recognition.MwBarcodeSettings";
|
|
2100
|
-
}
|
|
2101
|
-
|
|
2102
1965
|
/**
|
|
2103
1966
|
* BarcodeSettings copy constructor
|
|
2104
1967
|
* @param settings The source of the data
|
|
2105
1968
|
*/
|
|
2106
|
-
constructor(
|
|
2107
|
-
{
|
|
2108
|
-
if (settings != null)
|
|
2109
|
-
{
|
|
2110
|
-
super(settings.getJavaClass());
|
|
2111
|
-
}
|
|
2112
|
-
else
|
|
2113
|
-
{
|
|
2114
|
-
let java_link = java.import(BarcodeSettings.javaClassName);
|
|
2115
|
-
let barcodeSettings = new java_link();
|
|
2116
|
-
super(barcodeSettings);
|
|
2117
|
-
}
|
|
2118
|
-
}
|
|
2119
|
-
|
|
2120
|
-
/**
|
|
2121
|
-
* BarcodeSettings copy constructor
|
|
2122
|
-
* @param settings The source of the data
|
|
2123
|
-
*/
|
|
2124
|
-
static construct(javaClass)
|
|
1969
|
+
constructor(javaclass)
|
|
2125
1970
|
{
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
return barcodeSettings;
|
|
1971
|
+
super(javaclass);
|
|
1972
|
+
this.init()
|
|
2129
1973
|
}
|
|
2130
1974
|
|
|
2131
1975
|
init()
|
|
2132
1976
|
{
|
|
2133
|
-
this._australiaPost = AustraliaPostSettings
|
|
1977
|
+
this._australiaPost = new AustraliaPostSettings(this.getJavaClass().getAustraliaPostSync());
|
|
2134
1978
|
}
|
|
2135
1979
|
|
|
2136
1980
|
/**
|
|
@@ -2281,7 +2125,7 @@ class BarcodeSettings extends joint.BaseJavaClass
|
|
|
2281
2125
|
* @example
|
|
2282
2126
|
*
|
|
2283
2127
|
* let generator = new BarcodeGenerator(EncodeTypes.QR, "Слово"))
|
|
2284
|
-
*
|
|
2128
|
+
* im = generator.generateBarcodeImage(BarcodeImageFormat.PNG);
|
|
2285
2129
|
*
|
|
2286
2130
|
* //detects encoding for Unicode codesets is enabled
|
|
2287
2131
|
* let reader = new BarCodeReader(im, DecodeType.QR);
|
|
@@ -2311,7 +2155,7 @@ class BarcodeSettings extends joint.BaseJavaClass
|
|
|
2311
2155
|
* @example
|
|
2312
2156
|
*
|
|
2313
2157
|
* let generator = new BarcodeGenerator(EncodeTypes.QR, "Слово"))
|
|
2314
|
-
*
|
|
2158
|
+
* im = generator.generateBarcodeImage(BarcodeImageFormat.PNG);
|
|
2315
2159
|
*
|
|
2316
2160
|
* //detects encoding for Unicode codesets is enabled
|
|
2317
2161
|
* let reader = new BarCodeReader(im, DecodeType.QR);
|
|
@@ -2788,7 +2632,7 @@ class GS1CompositeBarExtendedParameters extends joint.BaseJavaClass
|
|
|
2788
2632
|
* This sample shows how to get Aztec raw values
|
|
2789
2633
|
* <pre>
|
|
2790
2634
|
* let generator = new BarcodeGenerator(EncodeTypes.AZTEC, "12345");
|
|
2791
|
-
* generator.save("test.png", BarcodeImageFormat
|
|
2635
|
+
* generator.save("test.png", BarcodeImageFormat.PNG);
|
|
2792
2636
|
*
|
|
2793
2637
|
* @example
|
|
2794
2638
|
* BarCodeReader reader = new BarCodeReader("test.png", null, DecodeType.AZTEC);
|
|
@@ -2885,6 +2729,102 @@ class AztecExtendedParameters extends joint.BaseJavaClass
|
|
|
2885
2729
|
}
|
|
2886
2730
|
}
|
|
2887
2731
|
|
|
2732
|
+
/**
|
|
2733
|
+
* <p>
|
|
2734
|
+
* Stores a Codabar additional information of recognized barcode
|
|
2735
|
+
* </p>
|
|
2736
|
+
*/
|
|
2737
|
+
class CodabarExtendedParameters extends joint.BaseJavaClass
|
|
2738
|
+
{
|
|
2739
|
+
constructor(javaClass)
|
|
2740
|
+
{
|
|
2741
|
+
super(javaClass);
|
|
2742
|
+
}
|
|
2743
|
+
|
|
2744
|
+
init()
|
|
2745
|
+
{
|
|
2746
|
+
}
|
|
2747
|
+
|
|
2748
|
+
/**
|
|
2749
|
+
* <p>
|
|
2750
|
+
* Gets or sets a Codabar start symbol.
|
|
2751
|
+
* Default value: CodabarSymbol.A
|
|
2752
|
+
* </p>
|
|
2753
|
+
*/
|
|
2754
|
+
getCodabarStartSymbol()
|
|
2755
|
+
{
|
|
2756
|
+
return this.getJavaClass().getCodabarStartSymbolSync();
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
/**
|
|
2760
|
+
* <p>
|
|
2761
|
+
* Gets or sets a Codabar start symbol.
|
|
2762
|
+
* Default value: CodabarSymbol.A
|
|
2763
|
+
* </p>
|
|
2764
|
+
*/
|
|
2765
|
+
setCodabarStartSymbol(value)
|
|
2766
|
+
{
|
|
2767
|
+
this.getJavaClass().setCodabarStartSymbolSync(value);
|
|
2768
|
+
}
|
|
2769
|
+
|
|
2770
|
+
/**
|
|
2771
|
+
* <p>
|
|
2772
|
+
* Gets or sets a Codabar stop symbol.
|
|
2773
|
+
* Default value: CodabarSymbol.A
|
|
2774
|
+
* </p>
|
|
2775
|
+
*/
|
|
2776
|
+
getCodabarStopSymbol()
|
|
2777
|
+
{
|
|
2778
|
+
return this.getJavaClass().getCodabarStopSymbolSync();
|
|
2779
|
+
}
|
|
2780
|
+
|
|
2781
|
+
/**
|
|
2782
|
+
* <p>
|
|
2783
|
+
* Gets or sets a Codabar stop symbol.
|
|
2784
|
+
* Default value: CodabarSymbol.A
|
|
2785
|
+
* </p>
|
|
2786
|
+
*/
|
|
2787
|
+
setCodabarStopSymbol(value)
|
|
2788
|
+
{
|
|
2789
|
+
this.getJavaClass().setCodabarStopSymbolSync(value);
|
|
2790
|
+
}
|
|
2791
|
+
|
|
2792
|
+
|
|
2793
|
+
/**
|
|
2794
|
+
* <p>
|
|
2795
|
+
* Returns a value indicating whether this instance is equal to a specified {@code CodabarExtendedParameters} value.
|
|
2796
|
+
* </p>
|
|
2797
|
+
* @return {@code <b>true</b>} if obj has the same value as this instance; otherwise, {@code <b>false</b>}.
|
|
2798
|
+
* @param obj An System.Object value to compare to this instance.
|
|
2799
|
+
*/
|
|
2800
|
+
equals(obj)
|
|
2801
|
+
{
|
|
2802
|
+
return this.getJavaClass().equalsSync(obj.getJavaClass());
|
|
2803
|
+
}
|
|
2804
|
+
|
|
2805
|
+
/**
|
|
2806
|
+
* <p>
|
|
2807
|
+
* Returns the hash code for this instance.
|
|
2808
|
+
* </p>
|
|
2809
|
+
* @return A 32-bit signed integer hash code.
|
|
2810
|
+
*/
|
|
2811
|
+
hashCode()
|
|
2812
|
+
{
|
|
2813
|
+
return this.getJavaClass().hashCodeSync();
|
|
2814
|
+
}
|
|
2815
|
+
|
|
2816
|
+
/**
|
|
2817
|
+
* <p>
|
|
2818
|
+
* Returns a human-readable string representation of this {@code CodabarExtendedParameters}.
|
|
2819
|
+
* </p>
|
|
2820
|
+
* @return A string that represents this {@code CodabarExtendedParameters}.
|
|
2821
|
+
*/
|
|
2822
|
+
toString()
|
|
2823
|
+
{
|
|
2824
|
+
return this.getJavaClass().toStringSync();
|
|
2825
|
+
}
|
|
2826
|
+
}
|
|
2827
|
+
|
|
2888
2828
|
/**
|
|
2889
2829
|
* Specify the type of barcode to read.
|
|
2890
2830
|
*
|
|
Binary file
|