aspose-barcode-for-python-via-java 24.6.0__tar.gz → 24.8.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.6.0 → aspose-barcode-for-python-via-java-24.8.0}/PKG-INFO +1 -1
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.8.0}/aspose_barcode_for_python_via_java.egg-info/PKG-INFO +1 -1
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.8.0}/aspose_barcode_for_python_via_java.egg-info/SOURCES.txt +1 -1
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.8.0}/asposebarcode/ComplexBarcode.py +108 -102
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.8.0}/asposebarcode/Generation.py +131 -17
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.8.0}/asposebarcode/Recognition.py +40 -40
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.8.0}/asposebarcode/__init__.py +1 -1
- aspose-barcode-for-python-via-java-24.6.0/asposebarcode/jlib/aspose-barcode-python-24.6.jar → aspose-barcode-for-python-via-java-24.8.0/asposebarcode/jlib/aspose-barcode-python-24.8.jar +0 -0
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.8.0}/setup.py +1 -1
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.8.0}/MANIFEST.in +0 -0
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.8.0}/README.md +0 -0
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.8.0}/aspose_barcode_for_python_via_java.egg-info/dependency_links.txt +0 -0
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.8.0}/aspose_barcode_for_python_via_java.egg-info/requires.txt +0 -0
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.8.0}/aspose_barcode_for_python_via_java.egg-info/top_level.txt +0 -0
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.8.0}/asposebarcode/Assist.py +0 -0
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.8.0}/license/End+User+License+Agreement.html +0 -0
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.8.0}/license/ThirdPartyLicenses.Aspose.BarCode.Java.pdf +0 -0
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.8.0}/setup.cfg +0 -0
{aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.8.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.8.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.8.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.8.jar
|
|
15
15
|
license/End+User+License+Agreement.html
|
|
16
16
|
license/ThirdPartyLicenses.Aspose.BarCode.Java.pdf
|
|
@@ -42,25 +42,24 @@ class ComplexBarcodeGenerator(Assist.BaseJavaClass):
|
|
|
42
42
|
ComplexBarcodeGenerator for backend complex barcode (e.g. SwissQR) images generation.
|
|
43
43
|
This sample shows how to create and save a SwissQR image.
|
|
44
44
|
\code
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
res = cg.generateBarCodeImage()
|
|
45
|
+
swissQRCodetext = ComplexBarcode.SwissQRCodetext(None)
|
|
46
|
+
swissQRCodetext.getBill().setAccount("CH450023023099999999A")
|
|
47
|
+
swissQRCodetext.getBill().setBillInformation("BillInformation")
|
|
48
|
+
swissQRCodetext.getBill().setAmount(1024)
|
|
49
|
+
swissQRCodetext.getBill().getCreditor().setName("Creditor.Name")
|
|
50
|
+
swissQRCodetext.getBill().getCreditor().setAddressLine1("Creditor.AddressLine1")
|
|
51
|
+
swissQRCodetext.getBill().getCreditor().setAddressLine2("Creditor.AddressLine2")
|
|
52
|
+
swissQRCodetext.getBill().getCreditor().setCountryCode("Nl")
|
|
53
|
+
swissQRCodetext.getBill().setUnstructuredMessage("UnstructuredMessage")
|
|
54
|
+
swissQRCodetext.getBill().setReference("Reference")
|
|
55
|
+
swissQRCodetext.getBill().setAlternativeSchemes([ComplexBarcode.AlternativeScheme("AlternativeSchemeInstruction1"), ComplexBarcode.AlternativeScheme("AlternativeSchemeInstruction2")])
|
|
56
|
+
swissQRCodetext.getBill().setDebtor(ComplexBarcode.Address())
|
|
57
|
+
swissQRCodetext.getBill().getDebtor().setName("Debtor.Name")
|
|
58
|
+
swissQRCodetext.getBill().getDebtor().setAddressLine1("Debtor.AddressLine1")
|
|
59
|
+
swissQRCodetext.getBill().getDebtor().setAddressLine2("Debtor.AddressLine2")
|
|
60
|
+
swissQRCodetext.getBill().getDebtor().setCountryCode("LU")
|
|
61
|
+
cg = ComplexBarcode.ComplexBarcodeGenerator(swissQRCodetext)
|
|
62
|
+
res = cg.generateBarCodeImage()
|
|
64
63
|
\endcode
|
|
65
64
|
"""
|
|
66
65
|
javaClassName = "com.aspose.mw.barcode.complexbarcode.MwComplexBarcodeGenerator"
|
|
@@ -104,8 +103,8 @@ class ComplexBarcodeGenerator(Assist.BaseJavaClass):
|
|
|
104
103
|
@param imagePath Path to save to.
|
|
105
104
|
@param imageFormat of BarCodeImageFormat enum (PNG, BMP, JPEG, GIF, TIFF)
|
|
106
105
|
\code
|
|
107
|
-
generator =
|
|
108
|
-
generator.save(
|
|
106
|
+
generator = Generation.BarcodeGenerator(Generation.EncodeTypes.CODE_128, "12345678")
|
|
107
|
+
generator.save(path_to_save, Generation.BarCodeImageFormat.PNG)
|
|
109
108
|
\endcode
|
|
110
109
|
"""
|
|
111
110
|
self.generateBarCodeImage().save(imagePath, str(imageFormat))
|
|
@@ -122,16 +121,17 @@ class Address(Assist.BaseJavaClass):
|
|
|
122
121
|
"""
|
|
123
122
|
javaClassName = "com.aspose.mw.barcode.complexbarcode.MwAddress"
|
|
124
123
|
|
|
125
|
-
def __init__(self
|
|
126
|
-
|
|
124
|
+
def __init__(self):
|
|
125
|
+
jclass = jpype.JClass(Address.javaClassName)
|
|
126
|
+
super().__init__(jclass())
|
|
127
127
|
self.init()
|
|
128
128
|
|
|
129
129
|
@staticmethod
|
|
130
|
-
def
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
return
|
|
130
|
+
def construct(javaClass):
|
|
131
|
+
address = Address()
|
|
132
|
+
address.setJavaClass(javaClass)
|
|
133
|
+
address.init()
|
|
134
|
+
return address
|
|
135
135
|
|
|
136
136
|
def getType(self):
|
|
137
137
|
"""!
|
|
@@ -409,9 +409,9 @@ class ComplexCodetextReader(Assist.BaseJavaClass):
|
|
|
409
409
|
ComplexCodetextReader decodes codetext to specified complex barcode type.
|
|
410
410
|
This sample shows how to recognize and decode SwissQR image.
|
|
411
411
|
\code
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
412
|
+
barCodeReader = Recognition.BarCodeReader("SwissQRCodetext.png", None, Recognition.DecodeType.QR)
|
|
413
|
+
results = barCodeReader.readBarCodes()
|
|
414
|
+
result = ComplexBarcode.ComplexCodetextReader.tryDecodeSwissQR(results[0].getCodeText())
|
|
415
415
|
\endcode
|
|
416
416
|
"""
|
|
417
417
|
javaClassName = "com.aspose.mw.barcode.complexbarcode.MwComplexCodetextReader"
|
|
@@ -499,8 +499,8 @@ class ComplexCodetextReader(Assist.BaseJavaClass):
|
|
|
499
499
|
@param: encodedCodetext: encoded codetext
|
|
500
500
|
@return: decoded HIBC PAS Complex Codetext or None.
|
|
501
501
|
"""
|
|
502
|
-
|
|
503
|
-
javaHIBCPAS =
|
|
502
|
+
javaComplexCodetextReader = jpype.JClass(ComplexCodetextReader.javaClassName)
|
|
503
|
+
javaHIBCPAS = javaComplexCodetextReader.tryDecodeHIBCPAS(encodedCodetext)
|
|
504
504
|
if javaHIBCPAS is None:
|
|
505
505
|
return None
|
|
506
506
|
return HIBCPASCodetext.construct(javaHIBCPAS)
|
|
@@ -520,8 +520,8 @@ class SwissQRBill(Assist.BaseJavaClass):
|
|
|
520
520
|
"""
|
|
521
521
|
|
|
522
522
|
def init(self):
|
|
523
|
-
self.creditor = Address(self.getJavaClass().getCreditor())
|
|
524
|
-
self.debtor = Address(self.getJavaClass().getDebtor())
|
|
523
|
+
self.creditor = Address.construct(self.getJavaClass().getCreditor())
|
|
524
|
+
self.debtor = Address.construct(self.getJavaClass().getDebtor())
|
|
525
525
|
|
|
526
526
|
def __init__(self, javaClass):
|
|
527
527
|
self.creditor = None
|
|
@@ -1245,11 +1245,12 @@ class MaxiCodeCodetext(IComplexCodetext):
|
|
|
1245
1245
|
|
|
1246
1246
|
This sample shows how to decode raw MaxiCode codetext to MaxiCodeCodetext instance.
|
|
1247
1247
|
\code
|
|
1248
|
-
reader = Recognition.BarCodeReader(
|
|
1248
|
+
reader = Recognition.BarCodeReader(imagePath, None, Recognition.DecodeType.MAXI_CODE)
|
|
1249
1249
|
for result in reader.readBarCodes():
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1250
|
+
resultMaxiCodeCodetext = ComplexBarcode.ComplexCodetextReader.tryDecodeMaxiCode(
|
|
1251
|
+
result.getExtended().getMaxiCode().getMaxiCodeMode(), result.getCodeText())
|
|
1252
|
+
print("BarCode Type: " + str(resultMaxiCodeCodetext.getBarcodeType()))
|
|
1253
|
+
print("MaxiCode mode: " + str(resultMaxiCodeCodetext.getMode()))
|
|
1253
1254
|
\endcode
|
|
1254
1255
|
"""
|
|
1255
1256
|
def getMode(self):
|
|
@@ -1310,11 +1311,11 @@ class MaxiCodeStandardCodetext(MaxiCodeCodetext):
|
|
|
1310
1311
|
|
|
1311
1312
|
# Mode 4
|
|
1312
1313
|
\code
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1314
|
+
maxiCodeCodetext = MaxiCodeStandardCodetext()
|
|
1315
|
+
maxiCodeCodetext.setMode(MaxiCodeMode.MODE_4)
|
|
1316
|
+
maxiCodeCodetext.setMessage("Test message")
|
|
1317
|
+
complexGenerator = ComplexBarcodeGenerator(maxiCodeCodetext.getConstructedCodetext())
|
|
1318
|
+
complexGenerator.generateBarCodeImage()
|
|
1318
1319
|
\endcode
|
|
1319
1320
|
|
|
1320
1321
|
\code
|
|
@@ -1345,7 +1346,7 @@ class MaxiCodeStandardCodetext(MaxiCodeCodetext):
|
|
|
1345
1346
|
java_class = jpype.JClass(MaxiCodeStandardCodetext.JAVA_CLASS_NAME)
|
|
1346
1347
|
super().__init__(java_class())
|
|
1347
1348
|
except Exception as ex:
|
|
1348
|
-
raise Assist.
|
|
1349
|
+
raise Assist.BarCodeException(ex)
|
|
1349
1350
|
|
|
1350
1351
|
@staticmethod
|
|
1351
1352
|
def construct(javaClass):
|
|
@@ -1422,7 +1423,7 @@ class MaxiCodeStandartSecondMessage(MaxiCodeSecondMessage):
|
|
|
1422
1423
|
java_class = jpype.JClass(MaxiCodeStandartSecondMessage.JAVA_CLASS_NAME)
|
|
1423
1424
|
super().__init__(java_class)
|
|
1424
1425
|
except Exception as ex:
|
|
1425
|
-
raise Assist.
|
|
1426
|
+
raise Assist.BarCodeException(ex.getMessage())
|
|
1426
1427
|
|
|
1427
1428
|
def setMessage(self, value):
|
|
1428
1429
|
"""!
|
|
@@ -1464,14 +1465,15 @@ class MaxiCodeStructuredCodetext(MaxiCodeCodetext):
|
|
|
1464
1465
|
This sample shows how to decode raw MaxiCode codetext to MaxiCodeStructuredCodetext instance.
|
|
1465
1466
|
\code
|
|
1466
1467
|
|
|
1467
|
-
reader = Recognition.BarCodeReader(
|
|
1468
|
+
reader = Recognition.BarCodeReader(imagePath, None, DecodeType.MAXI_CODE)
|
|
1468
1469
|
for result in reader.readBarCodes():
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1470
|
+
resultMaxiCodeCodetext = ComplexCodetextReader.tryDecodeMaxiCode(
|
|
1471
|
+
result.getExtended().getMaxiCode().getMaxiCodeMode(), result.getCodeText())
|
|
1472
|
+
if resultMaxiCodeCodetext is MaxiCodeStructuredCodetext:
|
|
1473
|
+
maxiCodeStructuredCodetext = resultMaxiCodeCodetext
|
|
1474
|
+
print("BarCode Type: " + maxiCodeStructuredCodetext.getPostalCode())
|
|
1475
|
+
print("MaxiCode mode: " + maxiCodeStructuredCodetext.getCountryCode())
|
|
1476
|
+
print("BarCode CodeText: " + maxiCodeStructuredCodetext.getServiceCategory())
|
|
1475
1477
|
\endcode
|
|
1476
1478
|
"""
|
|
1477
1479
|
JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwMaxiCodeStructuredCodetext"
|
|
@@ -1481,7 +1483,7 @@ class MaxiCodeStructuredCodetext(MaxiCodeCodetext):
|
|
|
1481
1483
|
super().__init__(javaClass)
|
|
1482
1484
|
self.maxiCodeSecondMessage = None
|
|
1483
1485
|
except Exception as ex:
|
|
1484
|
-
raise Assist.
|
|
1486
|
+
raise Assist.BarCodeException(ex.getMessage())
|
|
1485
1487
|
|
|
1486
1488
|
def init(self):
|
|
1487
1489
|
javaMaxiCodeSecondMessage = self.getJavaClass().getSecondMessage()
|
|
@@ -1614,10 +1616,11 @@ class MaxiCodeCodetextMode2(MaxiCodeStructuredCodetext):
|
|
|
1614
1616
|
\code
|
|
1615
1617
|
\endcode
|
|
1616
1618
|
|
|
1617
|
-
reader = Recognition.BarCodeReader(
|
|
1619
|
+
reader = Recognition.BarCodeReader(imagePath, None, DecodeType.MAXI_CODE)
|
|
1618
1620
|
for result in reader.readBarCodes():
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
+
resultMaxiCodeCodetext = ComplexCodetextReader.tryDecodeMaxiCode(
|
|
1622
|
+
result.getExtended().getMaxiCode().getMaxiCodeMode(), result.getCodeText())
|
|
1623
|
+
if resultMaxiCodeCodetext is MaxiCodeCodetextMode2:
|
|
1621
1624
|
maxiCodeStructuredCodetext = resultMaxiCodeCodetext
|
|
1622
1625
|
print("BarCode Type: " + maxiCodeStructuredCodetext.getPostalCode())
|
|
1623
1626
|
print("MaxiCode mode: " + maxiCodeStructuredCodetext.getCountryCode())
|
|
@@ -1628,19 +1631,20 @@ class MaxiCodeCodetextMode2(MaxiCodeStructuredCodetext):
|
|
|
1628
1631
|
|
|
1629
1632
|
\code
|
|
1630
1633
|
\endcode
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1634
|
+
reader = Recognition.BarCodeReader(imagePath, None, DecodeType.MAXI_CODE)
|
|
1635
|
+
for result in reader.readBarCodes():
|
|
1636
|
+
resultMaxiCodeCodetext = ComplexCodetextReader.tryDecodeMaxiCode(
|
|
1637
|
+
result.getExtended().getMaxiCode().getMaxiCodeMode(), result.getCodeText())
|
|
1638
|
+
if resultMaxiCodeCodetext is MaxiCodeCodetextMode2:
|
|
1639
|
+
maxiCodeStructuredCodetext = resultMaxiCodeCodetext
|
|
1640
|
+
print("BarCode Type: " + maxiCodeStructuredCodetext.getPostalCode())
|
|
1641
|
+
print("MaxiCode mode: " + maxiCodeStructuredCodetext.getCountryCode())
|
|
1642
|
+
print("BarCode CodeText: " + maxiCodeStructuredCodetext.getServiceCategory())
|
|
1643
|
+
if maxiCodeStructuredCodetext.SecondMessage is MaxiCodeStructuredSecondMessage:
|
|
1644
|
+
secondMessage = maxiCodeStructuredCodetext.getSecondMessage()
|
|
1645
|
+
print("Message:")
|
|
1646
|
+
for identifier in secondMessage.getIdentifiers():
|
|
1647
|
+
print(identifier)
|
|
1644
1648
|
\endcode
|
|
1645
1649
|
"""
|
|
1646
1650
|
JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwMaxiCodeCodetextMode2"
|
|
@@ -1650,7 +1654,7 @@ class MaxiCodeCodetextMode2(MaxiCodeStructuredCodetext):
|
|
|
1650
1654
|
java_class = jpype.JClass(MaxiCodeCodetextMode2.JAVA_CLASS_NAME)
|
|
1651
1655
|
super().__init__(java_class)
|
|
1652
1656
|
except Exception as ex:
|
|
1653
|
-
raise Assist.
|
|
1657
|
+
raise Assist.BarCodeException(ex.getMessage())
|
|
1654
1658
|
|
|
1655
1659
|
@staticmethod
|
|
1656
1660
|
def construct(javaClass):
|
|
@@ -1706,32 +1710,34 @@ class MaxiCodeCodetextMode3(MaxiCodeStructuredCodetext):
|
|
|
1706
1710
|
\endcode
|
|
1707
1711
|
\code
|
|
1708
1712
|
# Decoding raw codetext with standart second message
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1713
|
+
reader = Recognition.BarCodeReader(imagePath, None, DecodeType.MAXI_CODE)
|
|
1714
|
+
for result in reader.readBarCodes():
|
|
1715
|
+
resultMaxiCodeCodetext = ComplexCodetextReader.tryDecodeMaxiCode(
|
|
1716
|
+
result.getExtended().getMaxiCode().getMaxiCodeMode(), result.getCodeText())
|
|
1717
|
+
if resultMaxiCodeCodetext is MaxiCodeCodetextMode3:
|
|
1718
|
+
maxiCodeStructuredCodetext = resultMaxiCodeCodetext
|
|
1719
|
+
print("BarCode Type: " + maxiCodeStructuredCodetext.getPostalCode())
|
|
1720
|
+
print("MaxiCode mode: " + maxiCodeStructuredCodetext.getCountryCode())
|
|
1721
|
+
print("BarCode CodeText: " + maxiCodeStructuredCodetext.getServiceCategory())
|
|
1722
|
+
if maxiCodeStructuredCodetext.getSecondMessage() is MaxiCodeStandartSecondMessage:
|
|
1723
|
+
secondMessage = maxiCodeStructuredCodetext.getSecondMessage()
|
|
1724
|
+
print("Message: " + secondMessage.getMessage())
|
|
1720
1725
|
\endcode
|
|
1721
1726
|
\code
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1727
|
+
reader = Recognition.BarCodeReader(imagePath, None, DecodeType.MAXI_CODE)
|
|
1728
|
+
for result in reader.readBarCodes():
|
|
1729
|
+
resultMaxiCodeCodetext = ComplexCodetextReader.tryDecodeMaxiCode(
|
|
1730
|
+
result.getExtended().getMaxiCode().getMaxiCodeMode(), result.getCodeText())
|
|
1731
|
+
if resultMaxiCodeCodetext is MaxiCodeCodetextMode3:
|
|
1732
|
+
maxiCodeStructuredCodetext = resultMaxiCodeCodetext
|
|
1733
|
+
print("BarCode Type: " + maxiCodeStructuredCodetext.getPostalCode())
|
|
1734
|
+
print("MaxiCode mode: " + maxiCodeStructuredCodetext.getCountryCode())
|
|
1735
|
+
print("BarCode CodeText: " + maxiCodeStructuredCodetext.getServiceCategory())
|
|
1736
|
+
if maxiCodeStructuredCodetext.getSecondMessage() is MaxiCodeStructuredSecondMessage:
|
|
1737
|
+
secondMessage = maxiCodeStructuredCodetext.getSecondMessage()
|
|
1738
|
+
print("Message:")
|
|
1739
|
+
for identifier in secondMessage.getIdentifiers():
|
|
1740
|
+
print(identifier)
|
|
1735
1741
|
\endcode
|
|
1736
1742
|
"""
|
|
1737
1743
|
JAVA_CLASS_NAME = "com.aspose.mw.barcode.complexbarcode.MwMaxiCodeCodetextMode3"
|
|
@@ -1741,7 +1747,7 @@ class MaxiCodeCodetextMode3(MaxiCodeStructuredCodetext):
|
|
|
1741
1747
|
java_class = jpype.JClass(MaxiCodeCodetextMode3.JAVA_CLASS_NAME)
|
|
1742
1748
|
super().__init__(java_class)
|
|
1743
1749
|
except Exception as ex:
|
|
1744
|
-
raise Assist.
|
|
1750
|
+
raise Assist.BarCodeException(ex.getMessage())
|
|
1745
1751
|
|
|
1746
1752
|
@staticmethod
|
|
1747
1753
|
def construct(javaClass):
|
|
@@ -1773,7 +1779,7 @@ class MaxiCodeStructuredSecondMessage(MaxiCodeSecondMessage):
|
|
|
1773
1779
|
super().__init__(java_class())
|
|
1774
1780
|
self.maxiCodeSecondMessage = None
|
|
1775
1781
|
except Exception as ex:
|
|
1776
|
-
raise Assist.
|
|
1782
|
+
raise Assist.BarCodeException(ex.getMessage())
|
|
1777
1783
|
|
|
1778
1784
|
def getYear(self):
|
|
1779
1785
|
"""!
|
|
@@ -1846,11 +1852,11 @@ class HIBCLICComplexCodetext(IComplexCodetext):
|
|
|
1846
1852
|
|
|
1847
1853
|
This sample shows how to decode raw HIBC LIC codetext to HIBCLICComplexCodetext instance.
|
|
1848
1854
|
\code
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1855
|
+
reader = Recognition.BarCodeReader(imagePath, None, DecodeType.HIBC_AZTEC_LIC)
|
|
1856
|
+
for result in reader.readBarCodes():
|
|
1857
|
+
resultHIBCLICComplexCodetext = ComplexCodetextReader.tryDecodeHIBCLIC(result.getCodeText())
|
|
1858
|
+
print("BarCode Type: " + resultHIBCLICComplexCodetext.getBarcodeType())
|
|
1859
|
+
print("BarCode CodeText: " + resultHIBCLICComplexCodetext.getConstructedCodetext())
|
|
1854
1860
|
\endcode
|
|
1855
1861
|
"""
|
|
1856
1862
|
def __init__(self, javaClass):
|
|
@@ -3509,7 +3509,7 @@ class MaxiCodeExtCodetextBuilder(ExtCodetextBuilder):
|
|
|
3509
3509
|
java_class = jpype.JClass(MaxiCodeExtCodetextBuilder.JAVA_CLASS_NAME)
|
|
3510
3510
|
super().__init__(java_class())
|
|
3511
3511
|
except Exception as ex:
|
|
3512
|
-
raise Assist.
|
|
3512
|
+
raise Assist.BarCodeException(ex.getMessage())
|
|
3513
3513
|
|
|
3514
3514
|
def init(self):
|
|
3515
3515
|
pass
|
|
@@ -3952,8 +3952,9 @@ class ImageParameters(Assist.BaseJavaClass):
|
|
|
3952
3952
|
"""
|
|
3953
3953
|
|
|
3954
3954
|
def __init__(self, javaClass):
|
|
3955
|
-
super().__init__(javaClass)
|
|
3956
3955
|
self.svg = None
|
|
3956
|
+
super().__init__(javaClass)
|
|
3957
|
+
|
|
3957
3958
|
|
|
3958
3959
|
|
|
3959
3960
|
def init(self):
|
|
@@ -3963,6 +3964,7 @@ class ImageParameters(Assist.BaseJavaClass):
|
|
|
3963
3964
|
"""!
|
|
3964
3965
|
SVG parameters
|
|
3965
3966
|
"""
|
|
3967
|
+
# self.svg = self.getJavaClass().getSvg()
|
|
3966
3968
|
return self.svg
|
|
3967
3969
|
|
|
3968
3970
|
def setSvg(self, svg):
|
|
@@ -4011,6 +4013,105 @@ class SvgParameters(Assist.BaseJavaClass):
|
|
|
4011
4013
|
"""
|
|
4012
4014
|
self.getJavaClass().setTextDrawnInTextElement(textDrawnInTextElement)
|
|
4013
4015
|
|
|
4016
|
+
|
|
4017
|
+
def setSvgColorMode(self,svgColorMode):
|
|
4018
|
+
"""!
|
|
4019
|
+
Possible modes for filling color in svg file, RGB is default and supported by SVG 1.1.
|
|
4020
|
+
RGBA, HSL, HSLA is allowed in SVG 2.0 standard.
|
|
4021
|
+
Even in RGB opacity will be set through "fill-opacity" parameter
|
|
4022
|
+
"""
|
|
4023
|
+
self.getJavaClass().setSvgColorMode(svgColorMode.value)
|
|
4024
|
+
|
|
4025
|
+
def getSvgColorMode(self):
|
|
4026
|
+
"""!
|
|
4027
|
+
Possible modes for filling color in svg file, RGB is default and supported by SVG 1.1.
|
|
4028
|
+
RGBA, HSL, HSLA is allowed in SVG 2.0 standard.
|
|
4029
|
+
Even in RGB opacity will be set through "fill-opacity" parameter
|
|
4030
|
+
"""
|
|
4031
|
+
return SvgColorMode(self.getJavaClass().getSvgColorMode())
|
|
4032
|
+
|
|
4033
|
+
class HslaColor:
|
|
4034
|
+
"""!
|
|
4035
|
+
Class for representing HSLA color (Hue, Saturation, Lightness, Alpha)
|
|
4036
|
+
"""
|
|
4037
|
+
|
|
4038
|
+
def __init__(self, h, s, l, a):
|
|
4039
|
+
"""!
|
|
4040
|
+
Constructor for HslaColor
|
|
4041
|
+
@param h: Hue [0, 360]
|
|
4042
|
+
@param s: Saturation [0, 100]
|
|
4043
|
+
@param l: Lightness [0, 100]
|
|
4044
|
+
@param a: Alpha (opacity) [0.0f, 1.0f]
|
|
4045
|
+
"""
|
|
4046
|
+
self.checkHue(h)
|
|
4047
|
+
self.checkSatLight(s)
|
|
4048
|
+
self.checkSatLight(l)
|
|
4049
|
+
self.checkAlpha(a)
|
|
4050
|
+
|
|
4051
|
+
self.H = h
|
|
4052
|
+
self.S = s
|
|
4053
|
+
self.L = l
|
|
4054
|
+
self.A = a
|
|
4055
|
+
|
|
4056
|
+
@staticmethod
|
|
4057
|
+
def checkHue(value):
|
|
4058
|
+
if (value < 0 or value > 360):
|
|
4059
|
+
raise Exception("Wrong color value")
|
|
4060
|
+
|
|
4061
|
+
@staticmethod
|
|
4062
|
+
def checkSatLight(value):
|
|
4063
|
+
if (value < 0 or value > 100):
|
|
4064
|
+
raise Exception("Wrong color value")
|
|
4065
|
+
|
|
4066
|
+
@staticmethod
|
|
4067
|
+
def checkAlpha(value):
|
|
4068
|
+
if ((value < 0.0) or (value > 1.0)):
|
|
4069
|
+
raise Exception("Wrong color value")
|
|
4070
|
+
|
|
4071
|
+
@staticmethod
|
|
4072
|
+
def convertHslaToRgba(hslaColor):
|
|
4073
|
+
r = 0
|
|
4074
|
+
g = 0
|
|
4075
|
+
b = 0
|
|
4076
|
+
|
|
4077
|
+
hueF = hslaColor.H / 360.0
|
|
4078
|
+
satF = hslaColor.S / 100.0
|
|
4079
|
+
lightF = hslaColor.L / 100.0
|
|
4080
|
+
|
|
4081
|
+
if (satF == 0):
|
|
4082
|
+
r = g = b = lightF
|
|
4083
|
+
else :
|
|
4084
|
+
if lightF < 0.5:
|
|
4085
|
+
q = lightF * (1 + satF)
|
|
4086
|
+
else:
|
|
4087
|
+
q = lightF + satF - lightF * satF
|
|
4088
|
+
p = 2 * lightF - q
|
|
4089
|
+
|
|
4090
|
+
r = HslaColor.hueToRgb(p, q, hueF + 1.0 / 3.0)
|
|
4091
|
+
g = HslaColor.hueToRgb(p, q, hueF)
|
|
4092
|
+
b = HslaColor.hueToRgb(p, q, hueF - 1.0 / 3.0)
|
|
4093
|
+
|
|
4094
|
+
rI = int(r * 255 + 0.5)
|
|
4095
|
+
gI = int(g * 255 + 0.5)
|
|
4096
|
+
bI = int(b * 255 + 0.5)
|
|
4097
|
+
aI = int(hslaColor.A * 255 + 0.5)
|
|
4098
|
+
|
|
4099
|
+
return ( rI, gI, bI, aI)
|
|
4100
|
+
|
|
4101
|
+
@staticmethod
|
|
4102
|
+
def hueToRgb(p, q, t):
|
|
4103
|
+
if (t < 0.0):
|
|
4104
|
+
t += 1.0
|
|
4105
|
+
if (t > 1.0):
|
|
4106
|
+
t -= 1.0
|
|
4107
|
+
if (t < 1.0 / 6.0):
|
|
4108
|
+
return p + (q - p) * 6.0 * t
|
|
4109
|
+
if (t < 1.0 / 2.0):
|
|
4110
|
+
return q
|
|
4111
|
+
if (t < 2.0 / 3.0):
|
|
4112
|
+
return p + (q - p) * (2.0 / 3.0 - t) * 6.0
|
|
4113
|
+
return p
|
|
4114
|
+
|
|
4014
4115
|
class MacroCharacter(Enum):
|
|
4015
4116
|
"""!
|
|
4016
4117
|
Macro Characters 05 and 06 values are used to obtain more compact encoding in special modes.
|
|
@@ -4802,17 +4903,14 @@ class EncodeTypes(Enum):
|
|
|
4802
4903
|
## Specifies that the data should be encoded with CODE 11 barcode specification
|
|
4803
4904
|
CODE_11 = 1
|
|
4804
4905
|
|
|
4805
|
-
## Specifies that the data should be encoded with
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
## Specifies that the data should be encoded with Extended CODE 39 barcode specification
|
|
4809
|
-
CODE_39_EXTENDED = 3
|
|
4906
|
+
## Specifies that the data should be encoded with {@code <b>Code 39</b>} basic charset barcode specification: ISO/IEC 16388
|
|
4907
|
+
CODE_39 = 2
|
|
4810
4908
|
|
|
4811
|
-
## Specifies that the data should be encoded with
|
|
4812
|
-
|
|
4909
|
+
## Specifies that the data should be encoded with {@code <b>Code 39</b>} full ASCII charset barcode specification: ISO/IEC 16388
|
|
4910
|
+
CODE_39_FULL_ASCII = 3
|
|
4813
4911
|
|
|
4814
|
-
## Specifies that the data should be encoded with
|
|
4815
|
-
|
|
4912
|
+
## Specifies that the data should be encoded with {@code <b>CODE 93</b>} barcode specification
|
|
4913
|
+
CODE_93 = 5
|
|
4816
4914
|
|
|
4817
4915
|
## Specifies that the data should be encoded with CODE 128 barcode specification
|
|
4818
4916
|
CODE_128 = 6
|
|
@@ -5066,16 +5164,13 @@ class EncodeTypes(Enum):
|
|
|
5066
5164
|
elif encodeTypeName == "CODE_11":
|
|
5067
5165
|
return 1
|
|
5068
5166
|
|
|
5069
|
-
elif encodeTypeName == "
|
|
5167
|
+
elif encodeTypeName == "CODE_39":
|
|
5070
5168
|
return 2
|
|
5071
5169
|
|
|
5072
|
-
elif encodeTypeName == "
|
|
5170
|
+
elif encodeTypeName == "CODE_39_FULL_ASCII":
|
|
5073
5171
|
return 3
|
|
5074
5172
|
|
|
5075
|
-
elif encodeTypeName == "
|
|
5076
|
-
return 4
|
|
5077
|
-
|
|
5078
|
-
elif encodeTypeName == "CODE_93_EXTENDED":
|
|
5173
|
+
elif encodeTypeName == "CODE_93":
|
|
5079
5174
|
return 5
|
|
5080
5175
|
|
|
5081
5176
|
elif encodeTypeName == "CODE_128":
|
|
@@ -6640,3 +6735,22 @@ class RectMicroQRVersion(Enum):
|
|
|
6640
6735
|
R17x99 = 31
|
|
6641
6736
|
# Specifies version with 17 x 139 modules.
|
|
6642
6737
|
R17x139 = 32
|
|
6738
|
+
|
|
6739
|
+
class SvgColorMode(Enum):
|
|
6740
|
+
"""!
|
|
6741
|
+
Possible modes for filling color in svg file, RGB is default and supported by SVG 1.1.
|
|
6742
|
+
RGBA, HSL, HSLA is allowed in SVG 2.0 standard.
|
|
6743
|
+
Even in RGB opacity will be set through "fill-opacity" parameter
|
|
6744
|
+
"""
|
|
6745
|
+
|
|
6746
|
+
## RGB mode, example: fill="#ff5511" fill-opacity="0.73". Default mode.
|
|
6747
|
+
RGB = 0
|
|
6748
|
+
|
|
6749
|
+
## RGBA mode, example: fill="rgba(255, 85, 17, 0.73)"
|
|
6750
|
+
RGBA = 1
|
|
6751
|
+
|
|
6752
|
+
## HSL mode, example: fill="hsl(17, 100%, 53%)" fill-opacity="0.73"
|
|
6753
|
+
HSL = 2
|
|
6754
|
+
|
|
6755
|
+
## HSLA mode, example: fill="hsla(30, 50%, 70%, 0.8)"
|
|
6756
|
+
HSLA = 3
|
|
@@ -20,7 +20,7 @@ class BarCodeReader(Assist.BaseJavaClass):
|
|
|
20
20
|
|
|
21
21
|
This sample shows how to detect Code39 and Code128 barcodes.
|
|
22
22
|
\code
|
|
23
|
-
reader = Recognition.BarCodeReader("test.png", None, [DecodeType.
|
|
23
|
+
reader = Recognition.BarCodeReader("test.png", None, [DecodeType.CODE_39, DecodeType.CODE_128])
|
|
24
24
|
for result in reader.readBarCodes():
|
|
25
25
|
print("BarCode Type: " + result.getCodeTypeName())
|
|
26
26
|
print("BarCode CodeText: " + result.getCodeText())
|
|
@@ -101,8 +101,11 @@ class BarCodeReader(Assist.BaseJavaClass):
|
|
|
101
101
|
def convertToBase64Image(image):
|
|
102
102
|
if image is None:
|
|
103
103
|
return None
|
|
104
|
-
if isinstance(image, str)
|
|
105
|
-
|
|
104
|
+
if isinstance(image, str):
|
|
105
|
+
if not os.path.exists(image):
|
|
106
|
+
raise Assist.BarCodeException("Path '" + image + "' is incorrect")
|
|
107
|
+
else:
|
|
108
|
+
image = Image.open(image)
|
|
106
109
|
buffered = BytesIO()
|
|
107
110
|
image.save(buffered, format="PNG")
|
|
108
111
|
return base64.b64encode(buffered.getvalue())
|
|
@@ -154,7 +157,7 @@ class BarCodeReader(Assist.BaseJavaClass):
|
|
|
154
157
|
|
|
155
158
|
This sample shows how to read barcodes with BarCodeReader
|
|
156
159
|
\code
|
|
157
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
160
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
158
161
|
reader.readBarCodes()
|
|
159
162
|
for(let i = 0 reader.getFoundCount() > i ++i)
|
|
160
163
|
print("BarCode CodeText: " + reader.getFoundBarCodes()[i].getCodeText())
|
|
@@ -169,7 +172,7 @@ class BarCodeReader(Assist.BaseJavaClass):
|
|
|
169
172
|
|
|
170
173
|
This sample shows how to read barcodes with BarCodeReader
|
|
171
174
|
\code
|
|
172
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
175
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
173
176
|
reader.readBarCodes()
|
|
174
177
|
for(let i = 0 reader.getFoundCount() > i ++i)
|
|
175
178
|
print("BarCode CodeText: " + reader.getFoundBarCodes()[i].getCodeText())
|
|
@@ -184,10 +187,10 @@ class BarCodeReader(Assist.BaseJavaClass):
|
|
|
184
187
|
|
|
185
188
|
This sample shows how to read barcodes with BarCodeReader
|
|
186
189
|
\code
|
|
187
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
190
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
188
191
|
for result in reader.readBarCodes():
|
|
189
192
|
print("BarCode CodeText: " + result.getCodeText())
|
|
190
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
193
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
191
194
|
reader.readBarCodes()
|
|
192
195
|
for(let i = 0 reader.getFoundCount() > i ++i)
|
|
193
196
|
print("BarCode CodeText: " + reader.getFoundBarCodes()[i].getCodeText())
|
|
@@ -225,11 +228,11 @@ class BarCodeReader(Assist.BaseJavaClass):
|
|
|
225
228
|
reader.setQualitySettings(QualitySettings.getHighPerformance())
|
|
226
229
|
for result in reader.readBarCodes():
|
|
227
230
|
print("BarCode CodeText: " + result.getCodeText())
|
|
228
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
231
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
229
232
|
#normal quality mode is set by default
|
|
230
233
|
for result in reader.readBarCodes():
|
|
231
234
|
print("BarCode CodeText: " + result.getCodeText())
|
|
232
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
235
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
233
236
|
#set high performance mode
|
|
234
237
|
reader.setQualitySettings(QualitySettings.getHighPerformance())
|
|
235
238
|
#set separate options
|
|
@@ -254,16 +257,16 @@ class BarCodeReader(Assist.BaseJavaClass):
|
|
|
254
257
|
|
|
255
258
|
This sample shows how to use QualitySettings with BarCodeReader
|
|
256
259
|
\code
|
|
257
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
260
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
258
261
|
#set high performance mode
|
|
259
262
|
reader.setQualitySettings(QualitySettings.getHighPerformance())
|
|
260
263
|
for result in reader.readBarCodes():
|
|
261
264
|
print("BarCode CodeText: " + result.getCodeText())
|
|
262
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
265
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
263
266
|
#normal quality mode is set by default
|
|
264
267
|
for result in reader.readBarCodes():
|
|
265
268
|
print("BarCode CodeText: " + result.getCodeText())
|
|
266
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
269
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
267
270
|
#set high performance mode
|
|
268
271
|
reader.setQualitySettings(QualitySettings.getHighPerformance())
|
|
269
272
|
#set separate options
|
|
@@ -294,7 +297,7 @@ class BarCodeReader(Assist.BaseJavaClass):
|
|
|
294
297
|
\code
|
|
295
298
|
let bmp = "test.png"
|
|
296
299
|
reader = Recognition.BarCodeReader()
|
|
297
|
-
reader.setBarCodeReadType([ DecodeType.
|
|
300
|
+
reader.setBarCodeReadType([ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
298
301
|
var img = Image()
|
|
299
302
|
img.src = 'path_to_image'
|
|
300
303
|
width = img.width
|
|
@@ -321,7 +324,7 @@ class BarCodeReader(Assist.BaseJavaClass):
|
|
|
321
324
|
This sample shows how to detect Code39 and Code128 barcodes.
|
|
322
325
|
\code
|
|
323
326
|
reader = Recognition.BarCodeReader()
|
|
324
|
-
reader.setBarCodeReadType([ DecodeType.
|
|
327
|
+
reader.setBarCodeReadType([ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
325
328
|
reader.setBarCodeImage("test.png")
|
|
326
329
|
for result in reader.readBarCodes():
|
|
327
330
|
print("BarCode Type: " + result.getCodeTypeName())
|
|
@@ -893,7 +896,7 @@ class BarCodeResult(Assist.BaseJavaClass):
|
|
|
893
896
|
\code
|
|
894
897
|
generator = BarcodeGenerator(EncodeTypes.Code128, "12345")
|
|
895
898
|
generator.save("test.png", BarCodeImageFormat.PNG)
|
|
896
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
899
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
897
900
|
for result in reader.readBarCodes():
|
|
898
901
|
print("BarCode Type: " + result.getCodeTypeName())
|
|
899
902
|
print("BarCode CodeText: " + result.getCodeText())
|
|
@@ -1004,7 +1007,7 @@ class BarCodeRegionParameters(Assist.BaseJavaClass):
|
|
|
1004
1007
|
\code
|
|
1005
1008
|
generator = BarcodeGenerator(EncodeTypes.Code128, "12345")
|
|
1006
1009
|
generator.save("test.png", BarCodeImageFormat.PNG)
|
|
1007
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
1010
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
1008
1011
|
for result in reader.readBarCodes():
|
|
1009
1012
|
print("BarCode CodeText: " + result.getCodeText())
|
|
1010
1013
|
print("BarCode Angle: " + result.getRegion().getAngle())
|
|
@@ -1214,34 +1217,34 @@ class QualitySettings(Assist.BaseJavaClass):
|
|
|
1214
1217
|
Default value of QualitySettings is NormalQuality.
|
|
1215
1218
|
This sample shows how to use QualitySettings with BarCodeReader
|
|
1216
1219
|
\code
|
|
1217
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
1220
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
1218
1221
|
#set high performance mode
|
|
1219
1222
|
reader.setQualitySettings(QualitySettings.getHighPerformance())
|
|
1220
1223
|
for result in reader.readBarCodes():
|
|
1221
1224
|
print("BarCode CodeText: " + result.getCodeText())
|
|
1222
1225
|
\endcode
|
|
1223
1226
|
\code
|
|
1224
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
1227
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
1225
1228
|
#normal quality mode is set by default
|
|
1226
1229
|
for result in reader.readBarCodes():
|
|
1227
1230
|
print("BarCode CodeText: " + result.getCodeText())
|
|
1228
1231
|
\endcode
|
|
1229
1232
|
\code
|
|
1230
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
1233
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
1231
1234
|
#set high quality mode with low speed recognition
|
|
1232
1235
|
reader.setQualitySettings(QualitySettings.getHighQuality())
|
|
1233
1236
|
for result in reader.readBarCodes():
|
|
1234
1237
|
print("BarCode CodeText: " + result.getCodeText())
|
|
1235
1238
|
\endcode
|
|
1236
1239
|
\code
|
|
1237
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
1240
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
1238
1241
|
#set max barcodes mode, which tries to find all possible barcodes, even incorrect. The slowest recognition mode
|
|
1239
1242
|
reader.setQualitySettings(QualitySettings.getMaxBarCodes())
|
|
1240
1243
|
for result in reader.readBarCodes():
|
|
1241
1244
|
print("BarCode CodeText: " + result.getCodeText())
|
|
1242
1245
|
\endcode
|
|
1243
1246
|
\code
|
|
1244
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
1247
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
1245
1248
|
#set high performance mode
|
|
1246
1249
|
reader.setQualitySettings(QualitySettings.getHighPerformance())
|
|
1247
1250
|
#set separate options
|
|
@@ -1251,7 +1254,7 @@ class QualitySettings(Assist.BaseJavaClass):
|
|
|
1251
1254
|
print("BarCode CodeText: " + result.getCodeText())
|
|
1252
1255
|
\endcode
|
|
1253
1256
|
\code
|
|
1254
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
1257
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
1255
1258
|
#default mode is NormalQuality
|
|
1256
1259
|
#set separate options
|
|
1257
1260
|
reader.getQualitySettings().setAllowMedianSmoothing(true)
|
|
@@ -1322,7 +1325,7 @@ class QualitySettings(Assist.BaseJavaClass):
|
|
|
1322
1325
|
* </p><p><hr><blockquote><pre>
|
|
1323
1326
|
This sample shows how to use MaxQuality mode
|
|
1324
1327
|
|
|
1325
|
-
reader = new BarCodeReader("test.png"null, null, DecodeType::
|
|
1328
|
+
reader = new BarCodeReader("test.png"null, null, DecodeType::CODE_39_FULL_ASCII, DecodeType::CODE_128)
|
|
1326
1329
|
$reader->setQualitySettings(QualitySettings::getMaxQuality());
|
|
1327
1330
|
foreach($reader->readBarCodes() as $result)
|
|
1328
1331
|
echo ($result->getCodeText());
|
|
@@ -2248,7 +2251,7 @@ class DecodeType(Enum):
|
|
|
2248
2251
|
Specify the type of barcode to read.
|
|
2249
2252
|
This sample shows how to detect Code39 and Code128 barcodes.
|
|
2250
2253
|
\code
|
|
2251
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
2254
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
2252
2255
|
for result in reader.readBarCodes():
|
|
2253
2256
|
print("BarCode Type: " + result.getCodeTypeName())
|
|
2254
2257
|
print("BarCode CodeText: " + result.getCodeText())
|
|
@@ -2264,17 +2267,14 @@ class DecodeType(Enum):
|
|
|
2264
2267
|
## Specifies that the data should be decoded with {@code <b>CODE 11</b>} barcode specification
|
|
2265
2268
|
CODE_11 = 1
|
|
2266
2269
|
|
|
2267
|
-
##
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
## Specifies that the data should be decoded with {@code <b>Extended CODE 39</b>} barcode specification
|
|
2271
|
-
CODE_39_EXTENDED = 3
|
|
2270
|
+
## Specifies that the data should be decoded with {@code <b>Code 39</b>} basic charset barcode specification: ISO/IEC 16388
|
|
2271
|
+
CODE_39 = 2
|
|
2272
2272
|
|
|
2273
|
-
##
|
|
2274
|
-
|
|
2273
|
+
## Specifies that the data should be decoded with {@code <b>Code 39</b>} full ASCII charset barcode specification: ISO/IEC 16388
|
|
2274
|
+
CODE_39_FULL_ASCII = 3
|
|
2275
2275
|
|
|
2276
|
-
##
|
|
2277
|
-
|
|
2276
|
+
## Specifies that the data should be decoded with {@code <b>CODE 93</b>} barcode specification
|
|
2277
|
+
CODE_93 = 5
|
|
2278
2278
|
|
|
2279
2279
|
## Specifies that the data should be decoded with {@code <b>CODE 128</b>} barcode specification
|
|
2280
2280
|
CODE_128 = 6
|
|
@@ -2633,7 +2633,7 @@ class BarCodeConfidence(Enum):
|
|
|
2633
2633
|
#Moderate confidence
|
|
2634
2634
|
generator = BarcodeGenerator(EncodeTypes.CODE_128, "12345")
|
|
2635
2635
|
generator.save("test.png", BarCodeImageFormat.PNG)
|
|
2636
|
-
reader = Recognition.BarCodeReader("test.png", None, [DecodeType.
|
|
2636
|
+
reader = Recognition.BarCodeReader("test.png", None, [DecodeType.CODE_39, DecodeType.CODE_128])
|
|
2637
2637
|
for result in reader.readBarCodes():
|
|
2638
2638
|
print("BarCode Type: " + result.getCodeTypeName())
|
|
2639
2639
|
print("BarCode CodeText: " + result.getCodeText())
|
|
@@ -2644,7 +2644,7 @@ class BarCodeConfidence(Enum):
|
|
|
2644
2644
|
\code
|
|
2645
2645
|
generator = BarcodeGenerator(EncodeTypes.QR, "12345")
|
|
2646
2646
|
generator.save("test.png", BarCodeImageFormat.PNG)
|
|
2647
|
-
reader = Recognition.BarCodeReader("test.png", None, [DecodeType.
|
|
2647
|
+
reader = Recognition.BarCodeReader("test.png", None, [DecodeType.CODE_39, DecodeType.QR])
|
|
2648
2648
|
for result in reader.readBarCodes():
|
|
2649
2649
|
print("BarCode Type: " + result.getCodeTypeName())
|
|
2650
2650
|
print("BarCode CodeText: " + result.getCodeText())
|
|
@@ -2719,7 +2719,7 @@ class DeconvolutionMode(Enum):
|
|
|
2719
2719
|
This sample shows how to use Deconvolution mode
|
|
2720
2720
|
|
|
2721
2721
|
\code
|
|
2722
|
-
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.
|
|
2722
|
+
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.CODE_39_FULL_ASCII, Recognition.DecodeType.CODE_128])
|
|
2723
2723
|
reader.getQualitySettings().setDeconvolution(Recognition.DeconvolutionMode.SLOW)
|
|
2724
2724
|
for result in reader.readBarCodes():
|
|
2725
2725
|
console.log("BarCode CodeText: " + result.getCodeText())
|
|
@@ -2737,7 +2737,7 @@ class InverseImageMode(Enum):
|
|
|
2737
2737
|
"""!
|
|
2738
2738
|
Mode which enables or disables additional recognition of barcodes on images with inverted colors (luminance).
|
|
2739
2739
|
\code
|
|
2740
|
-
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.
|
|
2740
|
+
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.CODE_39_FULL_ASCII, Recognition.DecodeType.CODE_128])
|
|
2741
2741
|
reader.getQualitySettings().setInverseImage(Recognition.InverseImageMode.ENABLED)
|
|
2742
2742
|
for result in reader.readBarCodes():
|
|
2743
2743
|
console.log("BarCode CodeText: " + result.getCodeText())
|
|
@@ -2759,7 +2759,7 @@ class XDimensionMode(Enum):
|
|
|
2759
2759
|
|
|
2760
2760
|
This sample shows how to use XDimension mode
|
|
2761
2761
|
\code
|
|
2762
|
-
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.
|
|
2762
|
+
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.CODE_39_FULL_ASCII, Recognition.DecodeType.CODE_128])
|
|
2763
2763
|
reader.getQualitySettings().setXDimension(XDimensionMode.SMALL)
|
|
2764
2764
|
for result in reader.readBarCodes():
|
|
2765
2765
|
console.log("BarCode CodeText: " + result.getCodeText())
|
|
@@ -2784,7 +2784,7 @@ class ComplexBackgroundMode(Enum):
|
|
|
2784
2784
|
"""!
|
|
2785
2785
|
Mode which enables or disables additional recognition of color barcodes on color images.
|
|
2786
2786
|
\code
|
|
2787
|
-
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.
|
|
2787
|
+
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.CODE_39_FULL_ASCII, Recognition.DecodeType.CODE_128])
|
|
2788
2788
|
reader.getQualitySettings().setComplexBackground(ComplexBackgroundMode.ENABLED)
|
|
2789
2789
|
for result in reader.readBarCodes():
|
|
2790
2790
|
console.log("BarCode CodeText: " + result.getCodeText())
|
|
@@ -2802,7 +2802,7 @@ class BarcodeQualityMode(Enum):
|
|
|
2802
2802
|
"""!
|
|
2803
2803
|
Mode which enables methods to recognize barcode elements with the selected quality. Barcode element with lower quality requires more hard methods which slows the recognition.
|
|
2804
2804
|
\code
|
|
2805
|
-
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.
|
|
2805
|
+
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.CODE_39_FULL_ASCII, Recognition.DecodeType.CODE_128])
|
|
2806
2806
|
reader.getQualitySettings().setBarcodeQuality(BarcodeQualityMode.LOW)
|
|
2807
2807
|
for result in reader.readBarCodes():
|
|
2808
2808
|
console.log("BarCode CodeText: " + result.getCodeText())
|
|
@@ -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.8.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.6.0 → aspose-barcode-for-python-via-java-24.8.0}/MANIFEST.in
RENAMED
|
File without changes
|
{aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.8.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.6.0 → aspose-barcode-for-python-via-java-24.8.0}/setup.cfg
RENAMED
|
File without changes
|