aspose.barcode 22.10.1 → 22.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/Recognition.js
CHANGED
|
@@ -53,16 +53,17 @@ class BarCodeReader extends joint.BaseJavaClass
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
if (decodeTypes
|
|
56
|
+
if (decodeTypes === undefined || decodeTypes == null)
|
|
57
57
|
{
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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] + "";
|
|
66
67
|
}
|
|
67
68
|
try
|
|
68
69
|
{
|
|
@@ -1814,6 +1815,9 @@ class BarCodeRegionParameters extends joint.BaseJavaClass
|
|
|
1814
1815
|
}
|
|
1815
1816
|
}
|
|
1816
1817
|
|
|
1818
|
+
/**
|
|
1819
|
+
* Stores extended parameters of recognized barcode
|
|
1820
|
+
*/
|
|
1817
1821
|
class BarCodeExtendedParameters extends joint.BaseJavaClass
|
|
1818
1822
|
{
|
|
1819
1823
|
_oneDParameters;
|
|
@@ -1821,6 +1825,7 @@ class BarCodeExtendedParameters extends joint.BaseJavaClass
|
|
|
1821
1825
|
_qrParameters;
|
|
1822
1826
|
_pdf417Parameters;
|
|
1823
1827
|
_dataBarParameters;
|
|
1828
|
+
_maxiCodeParameters;
|
|
1824
1829
|
|
|
1825
1830
|
constructor(javaclass)
|
|
1826
1831
|
{
|
|
@@ -1835,6 +1840,7 @@ class BarCodeExtendedParameters extends joint.BaseJavaClass
|
|
|
1835
1840
|
this._qrParameters = new QRExtendedParameters(this.getJavaClass().getQRSync());
|
|
1836
1841
|
this._pdf417Parameters = new Pdf417ExtendedParameters(this.getJavaClass().getPdf417Sync());
|
|
1837
1842
|
this._dataBarParameters = new DataBarExtendedParameters(this.getJavaClass().getDataBarSync());
|
|
1843
|
+
this._maxiCodeParameters = new MaxiCodeExtendedParameters(this.getJavaClass().getMaxiCodeSync());
|
|
1838
1844
|
}
|
|
1839
1845
|
|
|
1840
1846
|
/** Gets a DataBar additional information DataBarExtendedParameters of recognized barcode<br>
|
|
@@ -1845,6 +1851,16 @@ class BarCodeExtendedParameters extends joint.BaseJavaClass
|
|
|
1845
1851
|
return this._dataBarParameters;
|
|
1846
1852
|
}
|
|
1847
1853
|
|
|
1854
|
+
/**
|
|
1855
|
+
* Gets a MaxiCode additional information<see cref="MaxiCodeExtendedParameters"/> of recognized barcode
|
|
1856
|
+
*
|
|
1857
|
+
* @return A MaxiCode additional information<see cref="MaxiCodeExtendedParameters"/> of recognized barcode
|
|
1858
|
+
*/
|
|
1859
|
+
getMaxiCode()
|
|
1860
|
+
{
|
|
1861
|
+
return this._maxiCodeParameters;
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1848
1864
|
/**
|
|
1849
1865
|
* Gets a special data OneDExtendedParameters of 1D recognized barcode Value: A special data OneDExtendedParameters of 1D recognized barcode
|
|
1850
1866
|
*/
|
|
@@ -2985,6 +3001,104 @@ class RecognitionAbortedException extends Error
|
|
|
2985
3001
|
}
|
|
2986
3002
|
}
|
|
2987
3003
|
|
|
3004
|
+
/**
|
|
3005
|
+
* Stores a MaxiCode additional information of recognized barcode
|
|
3006
|
+
*/
|
|
3007
|
+
class MaxiCodeExtendedParameters extends joint.BaseJavaClass
|
|
3008
|
+
{
|
|
3009
|
+
|
|
3010
|
+
constructor(javaClass)
|
|
3011
|
+
{
|
|
3012
|
+
super(javaClass);
|
|
3013
|
+
}
|
|
3014
|
+
|
|
3015
|
+
init()
|
|
3016
|
+
{
|
|
3017
|
+
}
|
|
3018
|
+
|
|
3019
|
+
/**
|
|
3020
|
+
* Gets a MaxiCode encode mode.
|
|
3021
|
+
* Default value: Mode4
|
|
3022
|
+
*/
|
|
3023
|
+
getMaxiCodeMode()
|
|
3024
|
+
{
|
|
3025
|
+
return this.getJavaClass().getMaxiCodeModeSync();
|
|
3026
|
+
}
|
|
3027
|
+
|
|
3028
|
+
/**
|
|
3029
|
+
* Sets a MaxiCode encode mode.
|
|
3030
|
+
* Default value: Mode4
|
|
3031
|
+
*/
|
|
3032
|
+
setMaxiCodeMode(maxiCodeMode)
|
|
3033
|
+
{
|
|
3034
|
+
this.getJavaClass().setMaxiCodeModeSync(maxiCodeMode);
|
|
3035
|
+
}
|
|
3036
|
+
|
|
3037
|
+
/**
|
|
3038
|
+
* Gets a MaxiCode barcode id in structured append mode.
|
|
3039
|
+
* Default value: 0
|
|
3040
|
+
*/
|
|
3041
|
+
getMaxiCodeStructuredAppendModeBarcodeId()
|
|
3042
|
+
{
|
|
3043
|
+
return this.getJavaClass().getMaxiCodeStructuredAppendModeBarcodeIdSync();
|
|
3044
|
+
}
|
|
3045
|
+
|
|
3046
|
+
/**
|
|
3047
|
+
* Sets a MaxiCode barcode id in structured append mode.
|
|
3048
|
+
* Default value: 0
|
|
3049
|
+
*/
|
|
3050
|
+
setMaxiCodeStructuredAppendModeBarcodeId(value)
|
|
3051
|
+
{
|
|
3052
|
+
this.getJavaClass().setMaxiCodeStructuredAppendModeBarcodeIdSync(value);
|
|
3053
|
+
}
|
|
3054
|
+
|
|
3055
|
+
/**
|
|
3056
|
+
* Gets a MaxiCode barcodes count in structured append mode.
|
|
3057
|
+
* Default value: -1
|
|
3058
|
+
*/
|
|
3059
|
+
getMaxiCodeStructuredAppendModeBarcodesCount()
|
|
3060
|
+
{
|
|
3061
|
+
return this.getJavaClass().getMaxiCodeStructuredAppendModeBarcodesCountSync();
|
|
3062
|
+
}
|
|
3063
|
+
|
|
3064
|
+
/**
|
|
3065
|
+
* Sets a MaxiCode barcodes count in structured append mode.
|
|
3066
|
+
* Default value: -1
|
|
3067
|
+
*/
|
|
3068
|
+
setMaxiCodeStructuredAppendModeBarcodesCount(value)
|
|
3069
|
+
{
|
|
3070
|
+
this.getJavaClass().setMaxiCodeStructuredAppendModeBarcodesCountSync(value);
|
|
3071
|
+
}
|
|
3072
|
+
|
|
3073
|
+
/**
|
|
3074
|
+
* Returns a value indicating whether this instance is equal to a specified <see cref="MaxiCodeExtendedParameters"/> value.
|
|
3075
|
+
* @param obj An Object value to compare to this instance.
|
|
3076
|
+
* @return <b>true</b> if obj has the same value as this instance; otherwise, <b>false</b>.
|
|
3077
|
+
*/
|
|
3078
|
+
equals(obj)
|
|
3079
|
+
{
|
|
3080
|
+
return this.getJavaClass().equalsSync(obj);
|
|
3081
|
+
}
|
|
3082
|
+
|
|
3083
|
+
/**
|
|
3084
|
+
* Returns the hash code for this instance.
|
|
3085
|
+
* @return A 32-bit signed integer hash code.
|
|
3086
|
+
*/
|
|
3087
|
+
getHashCode()
|
|
3088
|
+
{
|
|
3089
|
+
return this.getJavaClass().getHashCodeSync();
|
|
3090
|
+
}
|
|
3091
|
+
|
|
3092
|
+
/**
|
|
3093
|
+
* Returns a human-readable string representation of this <see cref="MaxiCodeExtendedParameters"/>.
|
|
3094
|
+
* @return A string that represents this <see cref="MaxiCodeExtendedParameters"/>.
|
|
3095
|
+
*/
|
|
3096
|
+
toString()
|
|
3097
|
+
{
|
|
3098
|
+
return this.getJavaClass().toStringSync();
|
|
3099
|
+
}
|
|
3100
|
+
}
|
|
3101
|
+
|
|
2988
3102
|
/**
|
|
2989
3103
|
* Specify the type of barcode to read.
|
|
2990
3104
|
* @example
|
|
@@ -2999,7 +3113,7 @@ class RecognitionAbortedException extends Error
|
|
|
2999
3113
|
* @enum
|
|
3000
3114
|
*/
|
|
3001
3115
|
DecodeType =
|
|
3002
|
-
|
|
3116
|
+
{
|
|
3003
3117
|
/**
|
|
3004
3118
|
* Unspecified decode type.
|
|
3005
3119
|
*/
|
|
@@ -3481,8 +3595,8 @@ CustomerInformationInterpretingType =
|
|
|
3481
3595
|
* reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.C_TABLE);
|
|
3482
3596
|
* reader.readBarCodes().forEach(function(result, i, results)
|
|
3483
3597
|
* {
|
|
3484
|
-
*
|
|
3485
|
-
*
|
|
3598
|
+
* console.log("BarCode Type: " + result.getCodeType());
|
|
3599
|
+
* console.log("BarCode CodeText: " + result.getCodeText());
|
|
3486
3600
|
* });
|
|
3487
3601
|
* @endcode
|
|
3488
3602
|
*/
|
|
@@ -3499,16 +3613,15 @@ CustomerInformationInterpretingType =
|
|
|
3499
3613
|
* reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.N_TABLE);
|
|
3500
3614
|
* reader.readBarCodes().forEach(function(result, i, results)
|
|
3501
3615
|
* {
|
|
3502
|
-
*
|
|
3503
|
-
*
|
|
3616
|
+
* console.log("BarCode Type: " + result.getCodeType());
|
|
3617
|
+
* console.log("BarCode CodeText: " + result.getCodeText());
|
|
3504
3618
|
* });
|
|
3505
|
-
* @endcode
|
|
3506
3619
|
*/
|
|
3507
3620
|
N_TABLE: 1,
|
|
3508
3621
|
/**
|
|
3509
3622
|
* Do not interpret the customer information. Allows 0, 1, 2 or 3 symbol only.
|
|
3510
3623
|
*
|
|
3511
|
-
* @
|
|
3624
|
+
* @example
|
|
3512
3625
|
* let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, "59123456780123012301230123");
|
|
3513
3626
|
* generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.OTHER);
|
|
3514
3627
|
* let image = generator.generateBarcodeImage(BarcodeImageFormat.PNG);
|
|
@@ -3516,10 +3629,9 @@ CustomerInformationInterpretingType =
|
|
|
3516
3629
|
* reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.OTHER));
|
|
3517
3630
|
* reader.readBarCodes().forEach(function(result, i, results)
|
|
3518
3631
|
* {
|
|
3519
|
-
*
|
|
3520
|
-
*
|
|
3632
|
+
* console.log("BarCode Type: " + result.getCodeType());
|
|
3633
|
+
* console.log("BarCode CodeText: " + result.getCodeText());
|
|
3521
3634
|
* });
|
|
3522
|
-
* @endcode
|
|
3523
3635
|
*/
|
|
3524
3636
|
OTHER: 2,
|
|
3525
3637
|
};
|
|
Binary file
|