aspose-barcode-for-python-via-java 24.8.1__tar.gz → 24.9.0__tar.gz
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.
- {aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/PKG-INFO +1 -1
- {aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/aspose_barcode_for_python_via_java.egg-info/PKG-INFO +1 -1
- {aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/aspose_barcode_for_python_via_java.egg-info/SOURCES.txt +1 -1
- {aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/asposebarcode/ComplexBarcode.py +8 -11
- {aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/asposebarcode/Generation.py +112 -115
- {aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/asposebarcode/Recognition.py +77 -49
- {aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/asposebarcode/__init__.py +1 -1
- aspose-barcode-for-python-via-java-24.8.1/asposebarcode/jlib/aspose-barcode-python-24.8.jar → aspose-barcode-for-python-via-java-24.9.0/asposebarcode/jlib/aspose-barcode-python-24.9.jar +0 -0
- {aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/setup.py +1 -1
- {aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/MANIFEST.in +0 -0
- {aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/README.md +0 -0
- {aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/aspose_barcode_for_python_via_java.egg-info/dependency_links.txt +0 -0
- {aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/aspose_barcode_for_python_via_java.egg-info/requires.txt +0 -0
- {aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/aspose_barcode_for_python_via_java.egg-info/top_level.txt +0 -0
- {aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/asposebarcode/Assist.py +0 -0
- {aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/license/End+User+License+Agreement.html +0 -0
- {aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/license/ThirdPartyLicenses.Aspose.BarCode.Java.pdf +0 -0
- {aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/setup.cfg +0 -0
{aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: aspose-barcode-for-python-via-java
|
|
3
|
-
Version: 24.
|
|
3
|
+
Version: 24.9.0
|
|
4
4
|
Summary: Barcode generation and recognition component. It allows developers to quickly and easily add barcode creation and scanning functionality to their Python applications.
|
|
5
5
|
Home-page: UNKNOWN
|
|
6
6
|
Author: Aspose
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: aspose-barcode-for-python-via-java
|
|
3
|
-
Version: 24.
|
|
3
|
+
Version: 24.9.0
|
|
4
4
|
Summary: Barcode generation and recognition component. It allows developers to quickly and easily add barcode creation and scanning functionality to their Python applications.
|
|
5
5
|
Home-page: UNKNOWN
|
|
6
6
|
Author: Aspose
|
|
@@ -11,6 +11,6 @@ asposebarcode/ComplexBarcode.py
|
|
|
11
11
|
asposebarcode/Generation.py
|
|
12
12
|
asposebarcode/Recognition.py
|
|
13
13
|
asposebarcode/__init__.py
|
|
14
|
-
asposebarcode/jlib/aspose-barcode-python-24.
|
|
14
|
+
asposebarcode/jlib/aspose-barcode-python-24.9.jar
|
|
15
15
|
license/End+User+License+Agreement.html
|
|
16
16
|
license/ThirdPartyLicenses.Aspose.BarCode.Java.pdf
|
|
@@ -1747,8 +1747,7 @@ class MaxiCodeCodetextMode3(MaxiCodeStructuredCodetext):
|
|
|
1747
1747
|
java_class = jpype.JClass(MaxiCodeCodetextMode3.JAVA_CLASS_NAME)
|
|
1748
1748
|
super().__init__(java_class())
|
|
1749
1749
|
except Exception as ex:
|
|
1750
|
-
raise Assist.BarCodeException(
|
|
1751
|
-
# raise Assist.BarCodeException(ex)
|
|
1750
|
+
raise Assist.BarCodeException(ex)
|
|
1752
1751
|
|
|
1753
1752
|
@staticmethod
|
|
1754
1753
|
def construct(javaClass):
|
|
@@ -2078,7 +2077,7 @@ class HIBCLICPrimaryDataCodetext(HIBCLICComplexCodetext):
|
|
|
2078
2077
|
"""!
|
|
2079
2078
|
Returns a value indicating whether this instance is equal to a specified HIBCLICPrimaryDataCodetext value.
|
|
2080
2079
|
@param: obj:An HIBCLICPrimaryDataCodetext value to compare to this instance.
|
|
2081
|
-
@return:<b>True</b> if obj has the same value as this instance; otherwise, <b>
|
|
2080
|
+
@return:<b>True</b> if obj has the same value as this instance; otherwise, <b>False</b>.
|
|
2082
2081
|
"""
|
|
2083
2082
|
return self.getJavaClass().equals(obj.getJavaClass())
|
|
2084
2083
|
|
|
@@ -2239,7 +2238,7 @@ class HIBCPASCodetext(IComplexCodetext):
|
|
|
2239
2238
|
Default value: HIBCCode39PAS.
|
|
2240
2239
|
@return:Barcode type.
|
|
2241
2240
|
"""
|
|
2242
|
-
self.getJavaClass().setBarcodeType(value)
|
|
2241
|
+
self.getJavaClass().setBarcodeType(value.value)
|
|
2243
2242
|
|
|
2244
2243
|
def getDataLocation(self):
|
|
2245
2244
|
"""!
|
|
@@ -2272,7 +2271,7 @@ class HIBCPASCodetext(IComplexCodetext):
|
|
|
2272
2271
|
@param: dataType:Type of data
|
|
2273
2272
|
@param: data:Data string
|
|
2274
2273
|
"""
|
|
2275
|
-
self.getJavaClass().addRecord(dataType, data)
|
|
2274
|
+
self.getJavaClass().addRecord(dataType.value, data)
|
|
2276
2275
|
|
|
2277
2276
|
def addHIBCPASRecord(self, record):
|
|
2278
2277
|
"""!
|
|
@@ -2312,7 +2311,7 @@ class HIBCPASCodetext(IComplexCodetext):
|
|
|
2312
2311
|
"""!
|
|
2313
2312
|
Returns a value indicating whether this instance is equal to a specified HIBCPASCodetext value.
|
|
2314
2313
|
@param: obj:An HIBCPASCodetext value to compare to this instance.
|
|
2315
|
-
@return:<b>True</b> if obj has the same value as this instance; otherwise, <b>
|
|
2314
|
+
@return:<b>True</b> if obj has the same value as this instance; otherwise, <b>False</b>.
|
|
2316
2315
|
"""
|
|
2317
2316
|
return self.getJavaClass().equals(obj.getJavaClass())
|
|
2318
2317
|
|
|
@@ -2376,7 +2375,7 @@ class HIBCPASRecord(Assist.BaseJavaClass):
|
|
|
2376
2375
|
"""!
|
|
2377
2376
|
Returns a value indicating whether this instance is equal to a specified HIBCPASDataType value.
|
|
2378
2377
|
@param: obj:An HIBCPASDataType value to compare to this instance.
|
|
2379
|
-
@return: <b>True</b> if obj has the same value as this instance; otherwise, <b>
|
|
2378
|
+
@return: <b>True</b> if obj has the same value as this instance; otherwise, <b>False</b>.
|
|
2380
2379
|
"""
|
|
2381
2380
|
return self.getJavaClass().equals(obj.getJavaClass())
|
|
2382
2381
|
|
|
@@ -2460,7 +2459,7 @@ class PrimaryData(Assist.BaseJavaClass):
|
|
|
2460
2459
|
"""!
|
|
2461
2460
|
Returns a value indicating whether this instance is equal to a specified PrimaryData value.
|
|
2462
2461
|
@param: obj:An PrimaryData value to compare to this instance.
|
|
2463
|
-
@return: <b>True</b> if obj has the same value as this instance; otherwise, <b>
|
|
2462
|
+
@return: <b>True</b> if obj has the same value as this instance; otherwise, <b>False</b>.
|
|
2464
2463
|
"""
|
|
2465
2464
|
return self.getJavaClass().equals(obj.getJavaClass())
|
|
2466
2465
|
|
|
@@ -2593,7 +2592,7 @@ class SecondaryAndAdditionalData(Assist.BaseJavaClass):
|
|
|
2593
2592
|
"""!
|
|
2594
2593
|
Returns a value indicating whether this instance is equal to a specified SecondaryAndAdditionalData value.
|
|
2595
2594
|
@param: obj:An SecondaryAndAdditionalData value to compare to this instance.
|
|
2596
|
-
@return: True if obj has the same value as this instance; otherwise,
|
|
2595
|
+
@return: True if obj has the same value as this instance; otherwise, False.
|
|
2597
2596
|
"""
|
|
2598
2597
|
return self.getJavaClass().equals(obj.getJavaClass())
|
|
2599
2598
|
|
|
@@ -2751,8 +2750,6 @@ class HIBCPASDataType(Enum):
|
|
|
2751
2750
|
|
|
2752
2751
|
## P - Dietary Item Identification
|
|
2753
2752
|
DIETARY_ITEM_IDENTIFICATION = 15
|
|
2754
|
-
"""
|
|
2755
|
-
"""
|
|
2756
2753
|
|
|
2757
2754
|
## Q - Manufacturer Serial Number
|
|
2758
2755
|
MANUFACTURER_SERIAL_NUMBER = 16
|
|
@@ -324,7 +324,7 @@ class BarcodeParameters(Assist.BaseJavaClass):
|
|
|
324
324
|
Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar
|
|
325
325
|
Checksum always used: Rest symbology
|
|
326
326
|
"""
|
|
327
|
-
return self.getJavaClass().isChecksumEnabled()
|
|
327
|
+
return EnableChecksum(self.getJavaClass().isChecksumEnabled())
|
|
328
328
|
|
|
329
329
|
def setChecksumEnabled(self, value):
|
|
330
330
|
"""!
|
|
@@ -358,7 +358,7 @@ class BarcodeParameters(Assist.BaseJavaClass):
|
|
|
358
358
|
Used for ITF, PZN, PharmaCode, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, IATA2of5, VIN, DeutschePost, OPC, Code32, DataLogic2of5, PatchCode, Code39Extended, Code39Standard
|
|
359
359
|
The WideNarrowRatio parameter value is less than or equal to 0.
|
|
360
360
|
"""
|
|
361
|
-
return self.getJavaClass().getWideNarrowRatio()
|
|
361
|
+
return float(self.getJavaClass().getWideNarrowRatio())
|
|
362
362
|
|
|
363
363
|
def setWideNarrowRatio(self, value):
|
|
364
364
|
"""!
|
|
@@ -613,7 +613,7 @@ class BaseGenerationParameters(Assist.BaseJavaClass):
|
|
|
613
613
|
Default value: 96 dpi.
|
|
614
614
|
The Resolution parameter value is less than or equal to 0.
|
|
615
615
|
"""
|
|
616
|
-
return self.getJavaClass().getResolution()
|
|
616
|
+
return float(self.getJavaClass().getResolution())
|
|
617
617
|
|
|
618
618
|
def getImage(self):
|
|
619
619
|
"""
|
|
@@ -643,7 +643,7 @@ class BaseGenerationParameters(Assist.BaseJavaClass):
|
|
|
643
643
|
generator.save(self.image_path_to_save, Generation.BarCodeImageFormat.PNG)
|
|
644
644
|
\endcode
|
|
645
645
|
"""
|
|
646
|
-
return self.getJavaClass().getRotationAngle()
|
|
646
|
+
return float(self.getJavaClass().getRotationAngle())
|
|
647
647
|
|
|
648
648
|
def setRotationAngle(self, value):
|
|
649
649
|
"""!
|
|
@@ -4149,30 +4149,30 @@ class MacroCharacter(Enum):
|
|
|
4149
4149
|
|
|
4150
4150
|
## None of Macro Characters are added to barcode data
|
|
4151
4151
|
NONE = 0
|
|
4152
|
-
|
|
4153
|
-
05 Macro craracter is added to barcode data in first position.
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
# to generate autoidentified GS1 message like this "(10)123ABC(10)123ABC" in ISO 15434 format you need:
|
|
4162
|
-
reader = Recognition.BarCodeReader(generator.generateBarCodeImage(), None,Recognition.DecodeType.GS_1_DATA_MATRIX)
|
|
4163
|
-
# to generate autoidentified GS1 message like this "(10)123ABC(10)123ABC" in ISO 15434 format you need:
|
|
4164
|
-
results = reader.readBarCodes()
|
|
4165
|
-
for result in results:
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
\endcode
|
|
4152
|
+
##
|
|
4153
|
+
# 05 Macro craracter is added to barcode data in first position.
|
|
4154
|
+
# GS1 Data Identifier ISO 15434
|
|
4155
|
+
# Character is translated to "[)>\u001E05\u001D" as decoded data header and "\u001E\u0004" as decoded data trailer.
|
|
4156
|
+
# to generate autoidentified GS1 message like this "(10)123ABC(10)123ABC" in ISO 15434 format you need:
|
|
4157
|
+
# \code
|
|
4158
|
+
# generator = Generation.BarcodeGenerator(Generation.EncodeTypes.DATA_MATRIX, "10123ABC\u001D10123ABC")
|
|
4159
|
+
# #to generate autoidentified GS1 message like this "(10)123ABC(10)123ABC" in ISO 15434 format you need:
|
|
4160
|
+
# generator.getParameters().getBarcode().getDataMatrix().setMacroCharacters(Generation.MacroCharacter.MACRO_05)
|
|
4161
|
+
# #to generate autoidentified GS1 message like this "(10)123ABC(10)123ABC" in ISO 15434 format you need:
|
|
4162
|
+
# reader = Recognition.BarCodeReader(generator.generateBarCodeImage(), None,Recognition.DecodeType.GS_1_DATA_MATRIX)
|
|
4163
|
+
# #to generate autoidentified GS1 message like this "(10)123ABC(10)123ABC" in ISO 15434 format you need:
|
|
4164
|
+
# results = reader.readBarCodes()
|
|
4165
|
+
# for result in results:
|
|
4166
|
+
# print(f"\nBarCode Type: {result.getCodeTypeName()}")
|
|
4167
|
+
# print(f"BarCode CodeText: {result.getCodeText()}")
|
|
4168
|
+
# \endcode
|
|
4169
4169
|
MACRO_05 = 5
|
|
4170
4170
|
|
|
4171
4171
|
## 06 Macro craracter is added to barcode data in first position.
|
|
4172
4172
|
# ASC MH10 Data Identifier ISO 15434
|
|
4173
4173
|
# Character is translated to "[)>\u001E06\u001D" as decoded data header and "\u001E\u0004" as decoded data trailer.
|
|
4174
4174
|
MACRO_06 = 6
|
|
4175
|
-
|
|
4175
|
+
|
|
4176
4176
|
class BarcodeClassifications(Enum):
|
|
4177
4177
|
"""!
|
|
4178
4178
|
BarcodeClassifications EncodeTypes classification
|
|
@@ -4244,10 +4244,12 @@ class DataMatrixEncodeMode(Enum):
|
|
|
4244
4244
|
generator = Generation.BarcodeGenerator(Generation.EncodeTypes.DATA_MATRIX, codetext)
|
|
4245
4245
|
generator.getParameters().getBarcode().getDataMatrix().setECIEncoding(Generation.ECIEncodings.UTF8)
|
|
4246
4246
|
generator.save(self.image_path_to_save5, Generation.BarCodeImageFormat.PNG)
|
|
4247
|
-
#
|
|
4247
|
+
# Binary mode
|
|
4248
4248
|
encodedArr = [0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9]
|
|
4249
|
-
generator = Generation.BarcodeGenerator(Generation.EncodeTypes.DATA_MATRIX,
|
|
4250
|
-
generator.
|
|
4249
|
+
generator = Generation.BarcodeGenerator(Generation.EncodeTypes.DATA_MATRIX, None)
|
|
4250
|
+
generator.setCodeText(encodedArr, None)
|
|
4251
|
+
generator.getParameters().getBarcode().getDataMatrix().setDataMatrixEncodeMode(
|
|
4252
|
+
Generation.DataMatrixEncodeMode.BINARY)
|
|
4251
4253
|
generator.save(self.image_path_to_save5, Generation.BarCodeImageFormat.PNG)
|
|
4252
4254
|
# Extended codetext mode
|
|
4253
4255
|
# create codetext
|
|
@@ -4832,8 +4834,6 @@ class AutoSizeMode(Enum):
|
|
|
4832
4834
|
|
|
4833
4835
|
## Barcode resizes to nearest lowest possible size
|
|
4834
4836
|
# which are specified by BarCodeWidth and BarCodeHeight properties.
|
|
4835
|
-
NEAREST = 1
|
|
4836
|
-
"""!
|
|
4837
4837
|
## Resizes barcode to specified size with little scaling
|
|
4838
4838
|
# but it can be little damaged in some cases
|
|
4839
4839
|
# because using interpolation for scaling.
|
|
@@ -4841,14 +4841,15 @@ class AutoSizeMode(Enum):
|
|
|
4841
4841
|
# and BarcodeGenerator.BarCodeHeight properties.
|
|
4842
4842
|
#
|
|
4843
4843
|
# This sample shows how to create and save a BarCode image in Scale mode.
|
|
4844
|
-
\code
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
\endcode
|
|
4851
|
-
|
|
4844
|
+
# \code
|
|
4845
|
+
# generator = Generation.BarcodeGenerator(Generation.EncodeTypes.DATA_MATRIX,"12345")
|
|
4846
|
+
# generator.getParameters().setAutoSizeMode(Generation.AutoSizeMode.NEAREST)
|
|
4847
|
+
# generator.getParameters().getImageWidth().setMillimeters(10)
|
|
4848
|
+
# generator.getParameters().getImageHeight().setInches(1.3)
|
|
4849
|
+
# generator.save(self.image_path_to_save4, Generation.BarCodeImageFormat.PNG)
|
|
4850
|
+
# \endcode
|
|
4851
|
+
NEAREST = 1
|
|
4852
|
+
|
|
4852
4853
|
INTERPOLATION = 2
|
|
4853
4854
|
|
|
4854
4855
|
class GraphicsUnit(Enum):
|
|
@@ -4889,7 +4890,6 @@ class EncodeTypes(Enum):
|
|
|
4889
4890
|
"""!
|
|
4890
4891
|
Specifies the type of barcode to encode.
|
|
4891
4892
|
"""
|
|
4892
|
-
|
|
4893
4893
|
## Unspecified encode type.
|
|
4894
4894
|
NONE = -1
|
|
4895
4895
|
|
|
@@ -5087,15 +5087,27 @@ class EncodeTypes(Enum):
|
|
|
5087
5087
|
|
|
5088
5088
|
## Specifies that the data should be encoded with UPC coupon with GS1-128 Extended Code barcode specification.
|
|
5089
5089
|
# An example of the input string:
|
|
5090
|
-
#
|
|
5090
|
+
# <br><b>generator.setCodeText("514141100906(8102)03", None)</b><br>
|
|
5091
5091
|
# where UPCA part is "514141100906", GS1Code128 part is (8102)03.
|
|
5092
|
+
# \code
|
|
5093
|
+
# generator = Generation.BarcodeGenerator(Generation.EncodeTypes.CODE_128, None)
|
|
5094
|
+
# generator.setCodeText("514141100906(8102)03", None),
|
|
5095
|
+
# generator.save(self.image_path_to_save4, Generation.BarCodeImageFormat.PNG)
|
|
5096
|
+
# \endcode
|
|
5092
5097
|
UPCA_GS_1_CODE_128_COUPON = 62
|
|
5093
5098
|
|
|
5094
5099
|
## Specifies that the data should be encoded with UPC coupon with GS1 DataBar addition barcode specification.
|
|
5095
|
-
# An example of the input string
|
|
5096
|
-
#
|
|
5100
|
+
# An example of the input string:<br>
|
|
5101
|
+
# <b>generator.setCodeText("514141100906(8110)106141416543213500110000310123196000", None),</b><br>
|
|
5097
5102
|
# where UPCA part is "514141100906", DATABAR part is "(8110)106141416543213500110000310123196000".
|
|
5098
|
-
# To change the caption, use
|
|
5103
|
+
# To change the caption, use<br>
|
|
5104
|
+
# <b>generator.getParameters().getCaptionAbove().setText("company prefix + offer code")</b><br>
|
|
5105
|
+
# \code
|
|
5106
|
+
# generator = Generation.BarcodeGenerator(Generation.EncodeTypes.CODE_128, None)
|
|
5107
|
+
# generator.setCodeText("514141100906(8110)106141416543213500110000310123196000", None)
|
|
5108
|
+
# generator.getParameters().getCaptionAbove().setText("company prefix + offer code")
|
|
5109
|
+
# generator.save(self.image_path_to_save4, Generation.BarCodeImageFormat.PNG)
|
|
5110
|
+
# \endcode
|
|
5099
5111
|
UPCA_GS_1_DATABAR_COUPON = 63
|
|
5100
5112
|
|
|
5101
5113
|
## Specifies that the data should be encoded with Codablock-F barcode specification.
|
|
@@ -5887,37 +5899,35 @@ class DotCodeEncodeMode(Enum):
|
|
|
5887
5899
|
generator.save(self.image_path_to_save, Generation.BarCodeImageFormat.BMP)
|
|
5888
5900
|
\endcode
|
|
5889
5901
|
\code
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
generator.save("test.bmp", BarcodeImageFormat:PNG)
|
|
5902
|
+
# Bytes mode
|
|
5903
|
+
encodedArr = [0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9]
|
|
5904
|
+
# encode array to string
|
|
5905
|
+
codetext = ""
|
|
5906
|
+
for bval in encodedArr:
|
|
5907
|
+
codetext += str(bval)
|
|
5908
|
+
generator = Generation.BarcodeGenerator(Generation.EncodeTypes.DOT_CODE, None)
|
|
5909
|
+
generator.setCodeText(encodedArr, None)
|
|
5910
|
+
generator.getParameters().getBarcode().getDotCode().setDotCodeEncodeMode(Generation.DotCodeEncodeMode.BINARY)
|
|
5911
|
+
generator.save(self.image_path_to_save4, Generation.BarCodeImageFormat.PNG)
|
|
5901
5912
|
\endcode
|
|
5902
5913
|
\code
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
generator.save("test.bmp", BarCodeImageFormat.BMP)
|
|
5914
|
+
# Extended codetext mode
|
|
5915
|
+
# create codetext
|
|
5916
|
+
textBuilder = Generation.DotCodeExtCodetextBuilder()
|
|
5917
|
+
textBuilder.addFNC1FormatIdentifier()
|
|
5918
|
+
textBuilder.addECICodetext(Generation.ECIEncodings.Win1251, "Will")
|
|
5919
|
+
textBuilder.addFNC1FormatIdentifier()
|
|
5920
|
+
textBuilder.addECICodetext(Generation.ECIEncodings.UTF8, "犬Right狗")
|
|
5921
|
+
textBuilder.addFNC3SymbolSeparator()
|
|
5922
|
+
textBuilder.addFNC1FormatIdentifier()
|
|
5923
|
+
textBuilder.addECICodetext(Generation.ECIEncodings.UTF16BE, "犬Power狗")
|
|
5924
|
+
textBuilder.addPlainCodetext("Plain text")
|
|
5925
|
+
# generate codetext
|
|
5926
|
+
codetext = textBuilder.getExtendedCodetext()
|
|
5927
|
+
# generate
|
|
5928
|
+
generator = Generation.BarcodeGenerator(Generation.EncodeTypes.DOT_CODE, codetext)
|
|
5929
|
+
generator.getParameters().getBarcode().getDotCode().setDotCodeEncodeMode(Generation.DotCodeEncodeMode.EXTENDED_CODETEXT)
|
|
5930
|
+
generator.save(self.image_path_to_save5, Generation.BarCodeImageFormat.BMP)
|
|
5921
5931
|
\endcode
|
|
5922
5932
|
"""
|
|
5923
5933
|
|
|
@@ -6270,46 +6280,36 @@ class HanXinErrorLevel(Enum):
|
|
|
6270
6280
|
class HanXinEncodeMode(Enum):
|
|
6271
6281
|
"""!
|
|
6272
6282
|
Han Xin Code encoding mode. It is recommended to use Auto with ASCII / Chinese characters or Unicode for Unicode characters.
|
|
6273
|
-
|
|
6274
6283
|
# Auto mode
|
|
6275
6284
|
\code
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6285
|
+
codetext = "1234567890ABCDEFGabcdefg,Han Xin Code"
|
|
6286
|
+
generator = Generation.BarcodeGenerator(Generation.EncodeTypes.HAN_XIN, codetext)
|
|
6287
|
+
generator.save(self.image_path_to_save5, Generation.BarCodeImageFormat.BMP)
|
|
6279
6288
|
\endcode
|
|
6280
|
-
|
|
6281
6289
|
\code
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
codetext += str(bval, 'utf-8')
|
|
6289
|
-
|
|
6290
|
-
generator = BarcodeGenerator(EncodeTypes.HAN_XIN, codetext)
|
|
6291
|
-
generator.getParameters().getBarcode().getHanXin().setHanXinEncodeMode(HanXinEncodeMode.BYTES)
|
|
6292
|
-
generator.save("test.bmp", BarcodeImageFormat.BMP)
|
|
6293
|
-
|
|
6290
|
+
# Binary mode
|
|
6291
|
+
encodedArr = [0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9]
|
|
6292
|
+
generator = Generation.BarcodeGenerator(Generation.EncodeTypes.HAN_XIN, None)
|
|
6293
|
+
generator.setCodeText(encodedArr, None)
|
|
6294
|
+
generator.getParameters().getBarcode().getHanXin().setHanXinEncodeMode(Generation.HanXinEncodeMode.BINARY)
|
|
6295
|
+
generator.save(self.image_path_to_save5, Generation.BarCodeImageFormat.BMP)
|
|
6294
6296
|
\endcode
|
|
6295
6297
|
\code
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6298
|
+
# ECI mode
|
|
6299
|
+
codetext = "ΑΒΓΔΕ"
|
|
6300
|
+
generator = Generation.BarcodeGenerator(Generation.EncodeTypes.HAN_XIN, codetext)
|
|
6301
|
+
generator.getParameters().getBarcode().getHanXin().setHanXinEncodeMode(Generation.HanXinEncodeMode.ECI)
|
|
6302
|
+
generator.getParameters().getBarcode().getHanXin().setHanXinECIEncoding(Generation.ECIEncodings.ISO_8859_7)
|
|
6303
|
+
generator.save(self.image_path_to_save5, Generation.BarCodeImageFormat.BMP)
|
|
6303
6304
|
\endcode
|
|
6304
6305
|
\code
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6306
|
+
# URI mode
|
|
6307
|
+
codetext = "https://www.test.com/%BC%DE%%%ab/search=test"
|
|
6308
|
+
generator = Generation.BarcodeGenerator(Generation.EncodeTypes.HAN_XIN, codetext)
|
|
6309
|
+
generator.getParameters().getBarcode().getHanXin().setHanXinEncodeMode(Generation.HanXinEncodeMode.URI)
|
|
6310
|
+
generator.save(self.image_path_to_save5, Generation.BarCodeImageFormat.BMP)
|
|
6310
6311
|
\endcode
|
|
6311
6312
|
"""
|
|
6312
|
-
|
|
6313
6313
|
## Sequence of Numeric, Text, ECI, Binary Bytes and 4 GB18030 modes changing automatically.
|
|
6314
6314
|
AUTO = 0
|
|
6315
6315
|
|
|
@@ -6332,22 +6332,19 @@ class HanXinEncodeMode(Enum):
|
|
|
6332
6332
|
|
|
6333
6333
|
class Code128EncodeMode(Enum):
|
|
6334
6334
|
"""!
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
generator.getParameters().getBarcode().getCode128().setCode128EncodeMode(Code128EncodeMode.CODE_A)
|
|
6349
|
-
generator.save("d:\\code128CodeA.png", BarCodeImageFormat.PNG)
|
|
6350
|
-
\endcode
|
|
6335
|
+
Encoding mode for Code128 barcodes.
|
|
6336
|
+
{@code Code 128} specification.
|
|
6337
|
+
This code demonstrates how to generate code 128 with different encodings
|
|
6338
|
+
\code
|
|
6339
|
+
# Generate code 128 with ISO 15417 encoding
|
|
6340
|
+
generator = Generation.BarcodeGenerator(Generation.EncodeTypes.CODE_128, "ABCD1234567890")
|
|
6341
|
+
generator.getParameters().getBarcode().getCode128().setCode128EncodeMode(Generation.Code128EncodeMode.AUTO)
|
|
6342
|
+
generator.save(self.image_path_to_save4, Generation.BarCodeImageFormat.PNG)
|
|
6343
|
+
# Generate code 128 only with Codeset A encoding
|
|
6344
|
+
generator = Generation.BarcodeGenerator(Generation.EncodeTypes.CODE_128, "ABCD1234567890")
|
|
6345
|
+
generator.getParameters().getBarcode().getCode128().setCode128EncodeMode(Generation.Code128EncodeMode.CODE_A)
|
|
6346
|
+
generator.save(self.image_path_to_save41, Generation.BarCodeImageFormat.PNG)
|
|
6347
|
+
\endcode
|
|
6351
6348
|
"""
|
|
6352
6349
|
|
|
6353
6350
|
## Encode codetext in classic ISO 15417 mode. The mode should be used in all ordinary cases.
|
|
@@ -583,6 +583,34 @@ class QRExtendedParameters(Assist.BaseJavaClass):
|
|
|
583
583
|
"""
|
|
584
584
|
return self.getJavaClass().getQRStructuredAppendModeParityData()
|
|
585
585
|
|
|
586
|
+
def getQRVersion(self):
|
|
587
|
+
"""!
|
|
588
|
+
Version of recognized QR Code. From Version1 to Version40.
|
|
589
|
+
@return: Version of recognized QR Code
|
|
590
|
+
"""
|
|
591
|
+
return int(self.getJavaClass().getQRVersion())
|
|
592
|
+
|
|
593
|
+
def getMicroQRVersion(self):
|
|
594
|
+
"""!
|
|
595
|
+
Version of recognized MicroQR Code. From M1 to M4.
|
|
596
|
+
@return Version of recognized MicroQR Code. From M1 to M4.
|
|
597
|
+
"""
|
|
598
|
+
return int(self.getJavaClass().getMicroQRVersion())
|
|
599
|
+
|
|
600
|
+
def getRectMicroQRVersion(self):
|
|
601
|
+
"""!
|
|
602
|
+
Version of recognized RectMicroQR Code. From R7x43 to R17x139.
|
|
603
|
+
@return: Version of recognized RectMicroQR Code
|
|
604
|
+
"""
|
|
605
|
+
return int(self.getJavaClass().getRectMicroQRVersion())
|
|
606
|
+
|
|
607
|
+
def getQRErrorLevel(self):
|
|
608
|
+
"""!
|
|
609
|
+
Version of recognized RectMicroQR Code. From R7x43 to R17x139.
|
|
610
|
+
@return: Version of recognized RectMicroQR Code
|
|
611
|
+
"""
|
|
612
|
+
return int(self.getJavaClass().getQRErrorLevel())
|
|
613
|
+
|
|
586
614
|
def isEmpty(self):
|
|
587
615
|
"""!
|
|
588
616
|
Tests whether all parameters has only default values
|
|
@@ -2569,48 +2597,52 @@ class Code128SubType(Enum):
|
|
|
2569
2597
|
class CustomerInformationInterpretingType(Enum):
|
|
2570
2598
|
"""!
|
|
2571
2599
|
Defines the interpreting type(C_TABLE or N_TABLE) of customer information for AustralianPost BarCode.
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
\
|
|
2600
|
+
"""
|
|
2601
|
+
##
|
|
2602
|
+
# Use C_TABLE to interpret the customer information. Allows A..Z, a..z, 1..9, space and sing.
|
|
2603
|
+
# \code
|
|
2604
|
+
# generator = Generation.BarcodeGenerator(Generation.EncodeTypes.AUSTRALIA_POST, "5912345678ABCde")
|
|
2605
|
+
# generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(Generation.CustomerInformationInterpretingType.C_TABLE)
|
|
2606
|
+
# image = generator.generateBarCodeImage()
|
|
2607
|
+
# reader = Recognition.BarCodeReader(image, None,Recognition.DecodeType.AUSTRALIA_POST)
|
|
2608
|
+
# reader.getBarcodeSettings().getAustraliaPost().setCustomerInformationInterpretingType(Recognition.CustomerInformationInterpretingType.C_TABLE)
|
|
2609
|
+
# results = reader.readBarCodes()
|
|
2610
|
+
# for result in results:
|
|
2611
|
+
# print(f"\nBarCode Type: {result.getCodeTypeName()}")
|
|
2612
|
+
# print(f"BarCode CodeText: {result.getCodeText()}")
|
|
2613
|
+
# \endcode
|
|
2584
2614
|
C_TABLE = 0
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2615
|
+
##
|
|
2616
|
+
# Use N_TABLE to interpret the customer information. Allows digits.
|
|
2617
|
+
# \code
|
|
2618
|
+
# generator = Generation.BarcodeGenerator(Generation.EncodeTypes.AUSTRALIA_POST, "59123456781234567")
|
|
2619
|
+
# generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(
|
|
2620
|
+
# Generation.CustomerInformationInterpretingType.N_TABLE)
|
|
2621
|
+
# image = generator.generateBarCodeImage()
|
|
2622
|
+
# reader = Recognition.BarCodeReader(image, None,Recognition.DecodeType.AUSTRALIA_POST)
|
|
2623
|
+
# reader.getBarcodeSettings().getAustraliaPost().setCustomerInformationInterpretingType(Recognition.CustomerInformationInterpretingType.N_TABLE)
|
|
2624
|
+
# for result in reader.readBarCodes():
|
|
2625
|
+
# print("BarCode Type: " + result.getCodeTypeName())
|
|
2626
|
+
# print("BarCode CodeText: " + result.getCodeText())
|
|
2627
|
+
# \endcode
|
|
2597
2628
|
N_TABLE = 1
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2629
|
+
##
|
|
2630
|
+
# Do not interpret the customer information. Allows 0, 1, 2 or 3 symbol only.
|
|
2631
|
+
# \code
|
|
2632
|
+
# generator = Generation.BarcodeGenerator(Generation.EncodeTypes.AUSTRALIA_POST, "59123456781234567")
|
|
2633
|
+
# generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(
|
|
2634
|
+
# Generation.CustomerInformationInterpretingType.N_TABLE)
|
|
2635
|
+
# image = generator.generateBarCodeImage()
|
|
2636
|
+
# reader = Recognition.BarCodeReader(image, None, Recognition.DecodeType.AUSTRALIA_POST)
|
|
2637
|
+
# reader.getBarcodeSettings().getAustraliaPost().setCustomerInformationInterpretingType(
|
|
2638
|
+
# Recognition.CustomerInformationInterpretingType.OTHER)
|
|
2639
|
+
# results = reader.readBarCodes()
|
|
2640
|
+
# for result in results:
|
|
2641
|
+
# print(f"\nBarCode Type: {result.getCodeTypeName()}")
|
|
2642
|
+
# print(f"BarCode CodeText: {result.getCodeText()}")
|
|
2643
|
+
# \endcode
|
|
2612
2644
|
OTHER = 2
|
|
2613
|
-
|
|
2645
|
+
|
|
2614
2646
|
class BarCodeConfidence(Enum):
|
|
2615
2647
|
"""!
|
|
2616
2648
|
Contains recognition confidence level
|
|
@@ -2626,26 +2658,23 @@ class BarCodeConfidence(Enum):
|
|
|
2626
2658
|
print("BarCode CodeText: " + result.getCodeText())
|
|
2627
2659
|
print("BarCode Confidence: " + str(result.getConfidence()))
|
|
2628
2660
|
print("BarCode ReadingQuality: " + str(result.getReadingQuality()))
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
reader = Recognition.BarCodeReader(self.image_path_to_save, None, [Recognition.DecodeType.CODE_39, Recognition.DecodeType.QR])
|
|
2635
|
-
for result in reader.readBarCodes():
|
|
2661
|
+
#Strong confidence
|
|
2662
|
+
generator = Generation.BarcodeGenerator(Generation.EncodeTypes.QR, "12345")
|
|
2663
|
+
generator.save(self.image_path_to_save, Generation.BarCodeImageFormat.PNG)
|
|
2664
|
+
reader = Recognition.BarCodeReader(self.image_path_to_save, None, [Recognition.DecodeType.CODE_39, Recognition.DecodeType.QR])
|
|
2665
|
+
for result in reader.readBarCodes():
|
|
2636
2666
|
print("\nBarCode Type: " + result.getCodeTypeName())
|
|
2637
2667
|
print("BarCode CodeText: " + result.getCodeText())
|
|
2638
2668
|
print("BarCode Confidence: " + str(result.getConfidence()))
|
|
2639
2669
|
print("BarCode ReadingQuality: " + str(result.getReadingQuality()))
|
|
2640
2670
|
\endcode
|
|
2641
2671
|
"""
|
|
2642
|
-
|
|
2643
2672
|
## Recognition confidence of barcode where codetext was not recognized correctly or barcode was detected as posible fake
|
|
2644
2673
|
NONE = "0"
|
|
2645
2674
|
|
|
2646
2675
|
## Recognition confidence of barcode (mostly 1D barcodes) with weak checksumm or even without it. Could contains some misrecognitions in codetext
|
|
2647
2676
|
# or even fake recognitions if is low
|
|
2648
|
-
# @see BarCodeResult.
|
|
2677
|
+
# @see BarCodeResult.getReadingQuality()
|
|
2649
2678
|
MODERATE = "80"
|
|
2650
2679
|
|
|
2651
2680
|
## Recognition confidence which was confirmed with BCH codes like Reed–Solomon. There must not be errors in read codetext or fake recognitions
|
|
@@ -2671,7 +2700,6 @@ class ChecksumValidation(Enum):
|
|
|
2671
2700
|
print(f"\nBarCode Type: {result.getCodeTypeName()}")
|
|
2672
2701
|
print(f"BarCode CodeText: {result.getCodeText()}")
|
|
2673
2702
|
print(f"BarCode Checksum: {result.getExtended().getOneD().getCheckSum()}")
|
|
2674
|
-
|
|
2675
2703
|
\endcode
|
|
2676
2704
|
\code
|
|
2677
2705
|
generator = Generation.BarcodeGenerator(Generation.EncodeTypes.EAN_13, "1234567890128")
|
|
@@ -3,6 +3,6 @@ import os
|
|
|
3
3
|
from asposebarcode import Generation, Recognition, Assist
|
|
4
4
|
|
|
5
5
|
__asposebarcode_dir__ = os.path.dirname(__file__)
|
|
6
|
-
__barcode_jar_path__ = __asposebarcode_dir__ + "/jlib/aspose-barcode-python-24.
|
|
6
|
+
__barcode_jar_path__ = __asposebarcode_dir__ + "/jlib/aspose-barcode-python-24.9.jar"
|
|
7
7
|
jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.class.path=%s" % __barcode_jar_path__)
|
|
8
8
|
__all__ = ['Assist','Recognition','Generation','ComplexBarcode']
|
{aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/MANIFEST.in
RENAMED
|
File without changes
|
{aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aspose-barcode-for-python-via-java-24.8.1 → aspose-barcode-for-python-via-java-24.9.0}/setup.cfg
RENAMED
|
File without changes
|