aspose-barcode-for-python-via-java 24.11.0__tar.gz → 25.1.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.11.0 → aspose-barcode-for-python-via-java-25.1.0}/PKG-INFO +1 -1
- {aspose-barcode-for-python-via-java-24.11.0 → aspose-barcode-for-python-via-java-25.1.0}/aspose_barcode_for_python_via_java.egg-info/PKG-INFO +1 -1
- {aspose-barcode-for-python-via-java-24.11.0 → aspose-barcode-for-python-via-java-25.1.0}/aspose_barcode_for_python_via_java.egg-info/SOURCES.txt +1 -1
- {aspose-barcode-for-python-via-java-24.11.0 → aspose-barcode-for-python-via-java-25.1.0}/asposebarcode/Assist.py +1 -1
- {aspose-barcode-for-python-via-java-24.11.0 → aspose-barcode-for-python-via-java-25.1.0}/asposebarcode/ComplexBarcode.py +71 -61
- {aspose-barcode-for-python-via-java-24.11.0 → aspose-barcode-for-python-via-java-25.1.0}/asposebarcode/Generation.py +41 -254
- {aspose-barcode-for-python-via-java-24.11.0 → aspose-barcode-for-python-via-java-25.1.0}/asposebarcode/Recognition.py +6 -26
- {aspose-barcode-for-python-via-java-24.11.0 → aspose-barcode-for-python-via-java-25.1.0}/asposebarcode/__init__.py +1 -1
- aspose-barcode-for-python-via-java-24.11.0/asposebarcode/jlib/aspose-barcode-python-24.11.jar → aspose-barcode-for-python-via-java-25.1.0/asposebarcode/jlib/aspose-barcode-python-25.1.jar +0 -0
- {aspose-barcode-for-python-via-java-24.11.0 → aspose-barcode-for-python-via-java-25.1.0}/setup.py +1 -1
- {aspose-barcode-for-python-via-java-24.11.0 → aspose-barcode-for-python-via-java-25.1.0}/MANIFEST.in +0 -0
- {aspose-barcode-for-python-via-java-24.11.0 → aspose-barcode-for-python-via-java-25.1.0}/README.md +0 -0
- {aspose-barcode-for-python-via-java-24.11.0 → aspose-barcode-for-python-via-java-25.1.0}/aspose_barcode_for_python_via_java.egg-info/dependency_links.txt +0 -0
- {aspose-barcode-for-python-via-java-24.11.0 → aspose-barcode-for-python-via-java-25.1.0}/aspose_barcode_for_python_via_java.egg-info/requires.txt +0 -0
- {aspose-barcode-for-python-via-java-24.11.0 → aspose-barcode-for-python-via-java-25.1.0}/aspose_barcode_for_python_via_java.egg-info/top_level.txt +0 -0
- {aspose-barcode-for-python-via-java-24.11.0 → aspose-barcode-for-python-via-java-25.1.0}/license/End+User+License+Agreement.html +0 -0
- {aspose-barcode-for-python-via-java-24.11.0 → aspose-barcode-for-python-via-java-25.1.0}/license/ThirdPartyLicenses.Aspose.BarCode.Java.pdf +0 -0
- {aspose-barcode-for-python-via-java-24.11.0 → aspose-barcode-for-python-via-java-25.1.0}/setup.cfg +0 -0
{aspose-barcode-for-python-via-java-24.11.0 → aspose-barcode-for-python-via-java-25.1.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:
|
|
3
|
+
Version: 25.1.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:
|
|
3
|
+
Version: 25.1.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-
|
|
14
|
+
asposebarcode/jlib/aspose-barcode-python-25.1.jar
|
|
15
15
|
license/End+User+License+Agreement.html
|
|
16
16
|
license/ThirdPartyLicenses.Aspose.BarCode.Java.pdf
|
|
@@ -2,8 +2,8 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from abc import abstractmethod
|
|
4
4
|
from typing import Union, List, Optional
|
|
5
|
-
import
|
|
6
|
-
from datetime import datetime
|
|
5
|
+
import calendar
|
|
6
|
+
from datetime import datetime, timezone
|
|
7
7
|
|
|
8
8
|
import jpype
|
|
9
9
|
import base64
|
|
@@ -106,11 +106,9 @@ class ComplexBarcodeGenerator(Assist.BaseJavaClass):
|
|
|
106
106
|
default value is BarCodeImageFormat.PNG
|
|
107
107
|
@return Pillow Image object of barcode image
|
|
108
108
|
"""
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
buf: io.BytesIO = io.BytesIO(bytes_data)
|
|
113
|
-
# Return an image object using Pillow
|
|
109
|
+
bytes_data = base64.b64decode(str(self.javaClass.generateBarCodeImage(
|
|
110
|
+
Generation.BarCodeImageFormat.PNG.value)))
|
|
111
|
+
buf = io.BytesIO(bytes_data)
|
|
114
112
|
return Image.open(buf)
|
|
115
113
|
|
|
116
114
|
def save(self, imageSource: Union[str, io.BytesIO], imageFormat: Generation.BarCodeImageFormat) -> None:
|
|
@@ -133,6 +131,7 @@ class ComplexBarcodeGenerator(Assist.BaseJavaClass):
|
|
|
133
131
|
except Exception as e:
|
|
134
132
|
raise IOError(f"Failed to save the image: {e}")
|
|
135
133
|
|
|
134
|
+
|
|
136
135
|
class Address(Assist.BaseJavaClass):
|
|
137
136
|
"""!
|
|
138
137
|
Address of creditor or debtor.
|
|
@@ -156,7 +155,7 @@ class Address(Assist.BaseJavaClass):
|
|
|
156
155
|
address.init()
|
|
157
156
|
return address
|
|
158
157
|
|
|
159
|
-
def getType(self) ->
|
|
158
|
+
def getType(self) -> AddressType:
|
|
160
159
|
"""!
|
|
161
160
|
Gets the address type.
|
|
162
161
|
The address type is automatically set by either setting street / house number
|
|
@@ -164,7 +163,7 @@ class Address(Assist.BaseJavaClass):
|
|
|
164
163
|
If fields of both types are set, the address type becomes Conflicting.
|
|
165
164
|
@return: The address type.
|
|
166
165
|
"""
|
|
167
|
-
return
|
|
166
|
+
return AddressType(self.getJavaClass().getType())
|
|
168
167
|
|
|
169
168
|
def getName(self) -> Optional[str]:
|
|
170
169
|
"""!
|
|
@@ -465,8 +464,9 @@ class ComplexCodetextReader(Assist.BaseJavaClass):
|
|
|
465
464
|
@return decoded SwissQRCodetext or None.
|
|
466
465
|
@param encodedCodetext encoded codetext
|
|
467
466
|
"""
|
|
468
|
-
|
|
469
|
-
|
|
467
|
+
javaComplexCodetextReaderClass = jpype.JClass(ComplexCodetextReader.javaClassName)
|
|
468
|
+
javaSwissQR = javaComplexCodetextReaderClass.tryDecodeSwissQR(encodedCodetext)
|
|
469
|
+
return None if javaSwissQR is None else SwissQRCodetext.construct(javaSwissQR)
|
|
470
470
|
|
|
471
471
|
@staticmethod
|
|
472
472
|
def tryDecodeMailmark2D(encodedCodetext: str) -> Optional[Mailmark2DCodetext]:
|
|
@@ -475,8 +475,9 @@ class ComplexCodetextReader(Assist.BaseJavaClass):
|
|
|
475
475
|
@param encodedCodetext encoded codetext
|
|
476
476
|
@return decoded Royal Mail Mailmark 2D or None.
|
|
477
477
|
"""
|
|
478
|
-
|
|
479
|
-
|
|
478
|
+
javaComplexCodetextReaderClass = jpype.JClass(ComplexCodetextReader.javaClassName)
|
|
479
|
+
javaMailmark2DCodetext = javaComplexCodetextReaderClass.tryDecodeMailmark2D(encodedCodetext)
|
|
480
|
+
return None if javaMailmark2DCodetext is None else Mailmark2DCodetext.construct(javaMailmark2DCodetext)
|
|
480
481
|
|
|
481
482
|
@staticmethod
|
|
482
483
|
def tryDecodeMailmark(encodedCodetext: str) -> Optional[MailmarkCodetext]:
|
|
@@ -485,15 +486,12 @@ class ComplexCodetextReader(Assist.BaseJavaClass):
|
|
|
485
486
|
@param encodedCodetext encoded codetext
|
|
486
487
|
@return Decoded Mailmark Barcode C and L or None.
|
|
487
488
|
"""
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
except Exception as e:
|
|
492
|
-
return None
|
|
493
|
-
return res
|
|
489
|
+
javaComplexCodetextReaderClass = jpype.JClass(ComplexCodetextReader.javaClassName)
|
|
490
|
+
javaDecodeMailmark = javaComplexCodetextReaderClass.tryDecodeMailmark(encodedCodetext)
|
|
491
|
+
return None if javaDecodeMailmark is None else MailmarkCodetext.construct(javaDecodeMailmark)
|
|
494
492
|
|
|
495
493
|
@staticmethod
|
|
496
|
-
def tryDecodeMaxiCode(maxiCodeMode:
|
|
494
|
+
def tryDecodeMaxiCode(maxiCodeMode: Generation.MaxiCodeMode, encodedCodetext: str) -> Optional[Union[MaxiCodeCodetextMode2, MaxiCodeCodetextMode3, MaxiCodeStandardCodetext]]:
|
|
497
495
|
"""!
|
|
498
496
|
Decodes MaxiCode codetext.
|
|
499
497
|
@param: maxiCodeMode: MaxiCode mode
|
|
@@ -503,7 +501,7 @@ class ComplexCodetextReader(Assist.BaseJavaClass):
|
|
|
503
501
|
javaComplexCodetextReaderClass = jpype.JClass(ComplexCodetextReader.javaClassName)
|
|
504
502
|
javaMaxiCodeCodetextMode2Class = jpype.JClass(MaxiCodeCodetextMode2.JAVA_CLASS_NAME)
|
|
505
503
|
javaMaxiCodeCodetextMode3Class = jpype.JClass(MaxiCodeCodetextMode3.JAVA_CLASS_NAME)
|
|
506
|
-
javaMaxiCodeCodetext = javaComplexCodetextReaderClass.tryDecodeMaxiCode(maxiCodeMode, encodedCodetext)
|
|
504
|
+
javaMaxiCodeCodetext = javaComplexCodetextReaderClass.tryDecodeMaxiCode(maxiCodeMode.value, encodedCodetext)
|
|
507
505
|
|
|
508
506
|
if javaMaxiCodeCodetext.getClass().equals(javaMaxiCodeCodetextMode2Class().getClass()):
|
|
509
507
|
return MaxiCodeCodetextMode2.construct(javaMaxiCodeCodetext)
|
|
@@ -819,15 +817,15 @@ class SwissQRCodetext(IComplexCodetext):
|
|
|
819
817
|
self.bill: SwissQRBill = SwissQRBill(self.getJavaClass().getBill())
|
|
820
818
|
|
|
821
819
|
def init(self) -> None:
|
|
820
|
+
self.bill = SwissQRBill(self.getJavaClass().getBill())
|
|
822
821
|
pass
|
|
823
|
-
# self.bill: Optional[SwissQRBill] = SwissQRBill(self.getJavaClass().getBill())
|
|
824
822
|
|
|
825
823
|
|
|
826
824
|
@staticmethod
|
|
827
825
|
def construct(javaClass) -> SwissQRCodetext:
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
return
|
|
826
|
+
pythonClass = SwissQRCodetext(None)
|
|
827
|
+
pythonClass.setJavaClass(javaClass)
|
|
828
|
+
return pythonClass
|
|
831
829
|
|
|
832
830
|
def getConstructedCodetext(self) -> Optional[str]:
|
|
833
831
|
"""!
|
|
@@ -858,6 +856,24 @@ class MailmarkCodetext(IComplexCodetext):
|
|
|
858
856
|
"""
|
|
859
857
|
javaClassName = "com.aspose.mw.barcode.complexbarcode.MwMailmarkCodetext"
|
|
860
858
|
|
|
859
|
+
def __init__(self) -> None:
|
|
860
|
+
"""!
|
|
861
|
+
Initializes a new instance of the MailmarkCodetext class.
|
|
862
|
+
@param: mailmarkCodetext:
|
|
863
|
+
"""
|
|
864
|
+
java_class_link = jpype.JClass(self.javaClassName)
|
|
865
|
+
javaClass = java_class_link()
|
|
866
|
+
super().__init__(javaClass)
|
|
867
|
+
|
|
868
|
+
@staticmethod
|
|
869
|
+
def construct(javaClass) -> MailmarkCodetext:
|
|
870
|
+
pythonClass = MailmarkCodetext()
|
|
871
|
+
pythonClass.setJavaClass(javaClass)
|
|
872
|
+
return pythonClass
|
|
873
|
+
|
|
874
|
+
def init(self) -> None:
|
|
875
|
+
pass
|
|
876
|
+
|
|
861
877
|
def getFormat(self) -> int:
|
|
862
878
|
"""!
|
|
863
879
|
"0" – None or Test
|
|
@@ -900,7 +916,7 @@ class MailmarkCodetext(IComplexCodetext):
|
|
|
900
916
|
"8" - Premium (Network Access)
|
|
901
917
|
"9" - Standard (Network Access)
|
|
902
918
|
"""
|
|
903
|
-
value = self.getJavaClass().getClass_()
|
|
919
|
+
value = self.getJavaClass().getClass_()
|
|
904
920
|
return str(value) if value is not None else None
|
|
905
921
|
|
|
906
922
|
def setClass(self, value: str) -> None:
|
|
@@ -972,22 +988,6 @@ class MailmarkCodetext(IComplexCodetext):
|
|
|
972
988
|
"""
|
|
973
989
|
self.getJavaClass().setDestinationPostCodePlusDPS(value)
|
|
974
990
|
|
|
975
|
-
def __init__(self, mailmarkCodetext: Optional[MailmarkCodetext]) -> None:
|
|
976
|
-
"""!
|
|
977
|
-
Initializes a new instance of the MailmarkCodetext class.
|
|
978
|
-
@param: mailmarkCodetext:
|
|
979
|
-
"""
|
|
980
|
-
java_class_link = jpype.JClass(self.javaClassName)
|
|
981
|
-
javaClass = None
|
|
982
|
-
if mailmarkCodetext is None:
|
|
983
|
-
javaClass = java_class_link()
|
|
984
|
-
else:
|
|
985
|
-
javaClass = java_class_link(mailmarkCodetext.getJavaClass())
|
|
986
|
-
super().__init__(javaClass)
|
|
987
|
-
|
|
988
|
-
def init(self) -> None:
|
|
989
|
-
pass
|
|
990
|
-
|
|
991
991
|
def getConstructedCodetext(self) -> Optional[str]:
|
|
992
992
|
"""!
|
|
993
993
|
Construct codetext from Mailmark data.
|
|
@@ -1492,12 +1492,17 @@ class MaxiCodeStandartSecondMessage(MaxiCodeSecondMessage):
|
|
|
1492
1492
|
|
|
1493
1493
|
def __init__(self) -> None:
|
|
1494
1494
|
try:
|
|
1495
|
-
java_class = jpype.JClass(
|
|
1496
|
-
MaxiCodeStandartSecondMessage.JAVA_CLASS_NAME)
|
|
1495
|
+
java_class = jpype.JClass(MaxiCodeStandartSecondMessage.JAVA_CLASS_NAME)
|
|
1497
1496
|
super().__init__(java_class())
|
|
1498
1497
|
except Exception as ex:
|
|
1499
1498
|
raise Assist.BarCodeException(ex)
|
|
1500
1499
|
|
|
1500
|
+
@staticmethod
|
|
1501
|
+
def construct(javaClass) -> MaxiCodeStandartSecondMessage:
|
|
1502
|
+
_class = MaxiCodeStandartSecondMessage()
|
|
1503
|
+
_class.setJavaClass(javaClass)
|
|
1504
|
+
return _class
|
|
1505
|
+
|
|
1501
1506
|
def setMessage(self, value: str) -> None:
|
|
1502
1507
|
"""!
|
|
1503
1508
|
Sets second message
|
|
@@ -1567,19 +1572,17 @@ class MaxiCodeStructuredCodetext(MaxiCodeCodetext):
|
|
|
1567
1572
|
|
|
1568
1573
|
def init(self) -> None:
|
|
1569
1574
|
javaMaxiCodeSecondMessage = self.getJavaClass().getSecondMessage()
|
|
1570
|
-
javaMaxiCodeStandartSecondMessageClass = jpype.JClass(
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
# self.maxiCodeSecondMessage = MaxiCodeStructuredSecondMessage(self.getJavaClass().getSecondMessage())
|
|
1582
|
-
self.maxiCodeSecondMessage = MaxiCodeStructuredSecondMessage() #TODO BARCODEPYTHON-569
|
|
1575
|
+
javaMaxiCodeStandartSecondMessageClass = jpype.JClass(MaxiCodeStandartSecondMessage.JAVA_CLASS_NAME)
|
|
1576
|
+
javaMaxiCodeStructuredSecondMessageClass = jpype.JClass(MaxiCodeStructuredSecondMessage.JAVA_CLASS_NAME)
|
|
1577
|
+
|
|
1578
|
+
if javaMaxiCodeSecondMessage is None:
|
|
1579
|
+
self.maxiCodeSecondMessage = None
|
|
1580
|
+
elif str(javaMaxiCodeSecondMessage.getClass().toString()) == str(javaMaxiCodeStandartSecondMessageClass.class_.toString()):
|
|
1581
|
+
self.maxiCodeSecondMessage = MaxiCodeStandartSecondMessage.construct(javaMaxiCodeSecondMessage)
|
|
1582
|
+
elif str(javaMaxiCodeSecondMessage.getClass().toString()) == str(javaMaxiCodeStructuredSecondMessageClass.class_.toString()):
|
|
1583
|
+
self.maxiCodeSecondMessage = MaxiCodeStructuredSecondMessage.construct(javaMaxiCodeSecondMessage)
|
|
1584
|
+
else:
|
|
1585
|
+
raise Exception()
|
|
1583
1586
|
|
|
1584
1587
|
def getPostalCode(self) -> str:
|
|
1585
1588
|
"""!
|
|
@@ -1877,6 +1880,12 @@ class MaxiCodeStructuredSecondMessage(MaxiCodeSecondMessage):
|
|
|
1877
1880
|
except Exception as ex:
|
|
1878
1881
|
raise Assist.BarCodeException(ex)
|
|
1879
1882
|
|
|
1883
|
+
@staticmethod
|
|
1884
|
+
def construct(javaClass) -> MaxiCodeStructuredSecondMessage:
|
|
1885
|
+
_class = MaxiCodeStructuredSecondMessage()
|
|
1886
|
+
_class.setJavaClass(javaClass)
|
|
1887
|
+
return _class
|
|
1888
|
+
|
|
1880
1889
|
def getYear(self) -> int:
|
|
1881
1890
|
"""!
|
|
1882
1891
|
Gets year. Year must be 2 digit integer value.
|
|
@@ -2279,6 +2288,7 @@ class HIBCLICSecondaryAndAdditionalDataCodetext(HIBCLICComplexCodetext):
|
|
|
2279
2288
|
@param: constructedCodetext:Constructed codetext.
|
|
2280
2289
|
"""
|
|
2281
2290
|
self.getJavaClass().initFromString(constructedCodetext)
|
|
2291
|
+
self.init()
|
|
2282
2292
|
|
|
2283
2293
|
def __eq__(self, other: HIBCLICSecondaryAndAdditionalDataCodetext) -> bool:
|
|
2284
2294
|
"""!
|
|
@@ -2637,13 +2647,13 @@ class SecondaryAndAdditionalData(Assist.BaseJavaClass):
|
|
|
2637
2647
|
"""!
|
|
2638
2648
|
Identifies expiry date. Will be used if ExpiryDateFormat is not set to None.
|
|
2639
2649
|
"""
|
|
2640
|
-
return datetime.fromtimestamp(int(str(self.getJavaClass().getExpiryDate())))
|
|
2650
|
+
return datetime.fromtimestamp(int(str(self.getJavaClass().getExpiryDate())), tz=timezone.utc)
|
|
2641
2651
|
|
|
2642
2652
|
def setExpiryDate(self, value: datetime) -> None:
|
|
2643
2653
|
"""!
|
|
2644
2654
|
Identifies expiry date. Will be used if ExpiryDateFormat is not set to None.
|
|
2645
2655
|
"""
|
|
2646
|
-
self.getJavaClass().setExpiryDate(str(int(
|
|
2656
|
+
self.getJavaClass().setExpiryDate(str(int(calendar.timegm(value.timetuple()))))
|
|
2647
2657
|
|
|
2648
2658
|
def getLotNumber(self) -> str:
|
|
2649
2659
|
"""!
|
|
@@ -2681,7 +2691,7 @@ class SecondaryAndAdditionalData(Assist.BaseJavaClass):
|
|
|
2681
2691
|
Date of manufacture can be set to DateTime.MinValue in order not to use this field.
|
|
2682
2692
|
Default value: DateTime.MinValue
|
|
2683
2693
|
"""
|
|
2684
|
-
return datetime.fromtimestamp(int(str(self.getJavaClass().getDateOfManufacture())))
|
|
2694
|
+
return datetime.fromtimestamp(int(str(self.getJavaClass().getDateOfManufacture())), tz=timezone.utc)
|
|
2685
2695
|
|
|
2686
2696
|
def setDateOfManufacture(self, value: datetime) -> None:
|
|
2687
2697
|
"""!
|
|
@@ -2689,7 +2699,7 @@ class SecondaryAndAdditionalData(Assist.BaseJavaClass):
|
|
|
2689
2699
|
Date of manufacture can be set to DateTime.MinValue in order not to use this field.
|
|
2690
2700
|
Default value: DateTime.MinValue
|
|
2691
2701
|
"""
|
|
2692
|
-
self.getJavaClass().setDateOfManufacture(str(int(
|
|
2702
|
+
self.getJavaClass().setDateOfManufacture(str(int(calendar.timegm(value.timetuple()))))
|
|
2693
2703
|
|
|
2694
2704
|
def getQuantity(self) -> int:
|
|
2695
2705
|
"""!
|
|
@@ -920,7 +920,17 @@ class CaptionParameters(Assist.BaseJavaClass):
|
|
|
920
920
|
"""!
|
|
921
921
|
String representation of the CaptionParameters object.
|
|
922
922
|
"""
|
|
923
|
-
return
|
|
923
|
+
return (
|
|
924
|
+
f"CaptionParameters("
|
|
925
|
+
f"text='{self.getText()}', "
|
|
926
|
+
f"font={self.getFont()}, "
|
|
927
|
+
f"text_color={self.getTextColor()}, "
|
|
928
|
+
f"alignment={self.getAlignment()}, "
|
|
929
|
+
f"padding={self.getPadding()}, "
|
|
930
|
+
f"visible={self.getVisible()}, "
|
|
931
|
+
f"no_wrap={self.getNoWrap()}"
|
|
932
|
+
f")"
|
|
933
|
+
)
|
|
924
934
|
|
|
925
935
|
|
|
926
936
|
class Unit(Assist.BaseJavaClass):
|
|
@@ -2479,14 +2489,14 @@ class Pdf417Parameters(Assist.BaseJavaClass):
|
|
|
2479
2489
|
"""
|
|
2480
2490
|
return int(self.getJavaClass().getMacroCharacters())
|
|
2481
2491
|
|
|
2482
|
-
def setMacroCharacters(self, value:
|
|
2492
|
+
def setMacroCharacters(self, value: MacroCharacter) -> None:
|
|
2483
2493
|
"""!
|
|
2484
2494
|
Macro Characters 05 and 06 values are used to obtain more compact encoding in special modes.
|
|
2485
2495
|
Can be used only with MicroPdf417 and encodes 916 and 917 MicroPdf417 modes
|
|
2486
2496
|
Default value: MacroCharacters.None.
|
|
2487
2497
|
@param MacroCharacters int value
|
|
2488
2498
|
"""
|
|
2489
|
-
self.getJavaClass().setMacroCharacters(value)
|
|
2499
|
+
self.getJavaClass().setMacroCharacters(value.value)
|
|
2490
2500
|
|
|
2491
2501
|
def isLinked(self) -> bool:
|
|
2492
2502
|
"""!
|
|
@@ -2999,6 +3009,18 @@ class FontUnit(Assist.BaseJavaClass):
|
|
|
2999
3009
|
"""
|
|
3000
3010
|
return self._size
|
|
3001
3011
|
|
|
3012
|
+
def __str__(self) -> str:
|
|
3013
|
+
"""!
|
|
3014
|
+
String representation of the FontUnit object.
|
|
3015
|
+
"""
|
|
3016
|
+
return (
|
|
3017
|
+
f"FontUnit("
|
|
3018
|
+
f"family_name='{self.getFamilyName()}', "
|
|
3019
|
+
f"style={self.getStyle()}, "
|
|
3020
|
+
f"size={self.getSize()}"
|
|
3021
|
+
f")"
|
|
3022
|
+
)
|
|
3023
|
+
|
|
3002
3024
|
class ExtCodetextBuilder(Assist.BaseJavaClass):
|
|
3003
3025
|
"""!
|
|
3004
3026
|
Helper class for automatic codetext generation of the Extended Codetext Mode
|
|
@@ -4866,258 +4888,20 @@ class EncodeTypes(Enum):
|
|
|
4866
4888
|
RECT_MICRO_QR = 84
|
|
4867
4889
|
|
|
4868
4890
|
@staticmethod
|
|
4869
|
-
def parse(encodeTypeName):
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
elif encodeTypeName == "CODE_39_FULL_ASCII":
|
|
4880
|
-
return 3
|
|
4881
|
-
|
|
4882
|
-
elif encodeTypeName == "CODE_93":
|
|
4883
|
-
return 5
|
|
4884
|
-
|
|
4885
|
-
elif encodeTypeName == "CODE_128":
|
|
4886
|
-
return 6
|
|
4887
|
-
|
|
4888
|
-
elif encodeTypeName == "GS_1_CODE_128":
|
|
4889
|
-
return 7
|
|
4890
|
-
|
|
4891
|
-
elif encodeTypeName == "EAN_8":
|
|
4892
|
-
return 8
|
|
4893
|
-
|
|
4894
|
-
elif encodeTypeName == "EAN_13":
|
|
4895
|
-
return 9
|
|
4896
|
-
|
|
4897
|
-
elif encodeTypeName == "EAN_14":
|
|
4898
|
-
return 10
|
|
4899
|
-
|
|
4900
|
-
elif encodeTypeName == "SCC_14":
|
|
4901
|
-
return 11
|
|
4902
|
-
|
|
4903
|
-
elif encodeTypeName == "SSCC_18":
|
|
4904
|
-
return 12
|
|
4905
|
-
|
|
4906
|
-
elif encodeTypeName == "UPCA":
|
|
4907
|
-
return 13
|
|
4908
|
-
|
|
4909
|
-
elif encodeTypeName == "UPCE":
|
|
4910
|
-
return 14
|
|
4911
|
-
|
|
4912
|
-
elif encodeTypeName == "ISBN":
|
|
4913
|
-
return 15
|
|
4914
|
-
|
|
4915
|
-
elif encodeTypeName == "ISSN":
|
|
4916
|
-
return 16
|
|
4917
|
-
|
|
4918
|
-
elif encodeTypeName == "ISMN":
|
|
4919
|
-
return 17
|
|
4920
|
-
|
|
4921
|
-
elif encodeTypeName == "STANDARD_2_OF_5":
|
|
4922
|
-
return 18
|
|
4923
|
-
|
|
4924
|
-
elif encodeTypeName == "INTERLEAVED_2_OF_5":
|
|
4925
|
-
return 19
|
|
4926
|
-
|
|
4927
|
-
elif encodeTypeName == "MATRIX_2_OF_5":
|
|
4928
|
-
return 20
|
|
4929
|
-
|
|
4930
|
-
elif encodeTypeName == "ITALIAN_POST_25":
|
|
4931
|
-
return 21
|
|
4932
|
-
|
|
4933
|
-
elif encodeTypeName == "IATA_2_OF_5":
|
|
4934
|
-
return 22
|
|
4935
|
-
|
|
4936
|
-
elif encodeTypeName == "ITF_14":
|
|
4937
|
-
return 23
|
|
4938
|
-
|
|
4939
|
-
elif encodeTypeName == "ITF_6":
|
|
4940
|
-
return 24
|
|
4941
|
-
|
|
4942
|
-
elif encodeTypeName == "MSI":
|
|
4943
|
-
return 25
|
|
4944
|
-
|
|
4945
|
-
elif encodeTypeName == "VIN":
|
|
4946
|
-
return 26
|
|
4947
|
-
|
|
4948
|
-
elif encodeTypeName == "DEUTSCHE_POST_IDENTCODE":
|
|
4949
|
-
return 27
|
|
4950
|
-
|
|
4951
|
-
elif encodeTypeName == "DEUTSCHE_POST_LEITCODE":
|
|
4952
|
-
return 28
|
|
4953
|
-
|
|
4954
|
-
elif encodeTypeName == "OPC":
|
|
4955
|
-
return 29
|
|
4956
|
-
|
|
4957
|
-
elif encodeTypeName == "PZN":
|
|
4958
|
-
return 30
|
|
4959
|
-
|
|
4960
|
-
elif encodeTypeName == "CODE_16_K":
|
|
4961
|
-
return 31
|
|
4962
|
-
|
|
4963
|
-
elif encodeTypeName == "PHARMACODE":
|
|
4964
|
-
return 32
|
|
4965
|
-
|
|
4966
|
-
elif encodeTypeName == "DATA_MATRIX":
|
|
4967
|
-
return 33
|
|
4968
|
-
|
|
4969
|
-
elif encodeTypeName == "QR":
|
|
4970
|
-
return 34
|
|
4971
|
-
|
|
4972
|
-
elif encodeTypeName == "AZTEC":
|
|
4973
|
-
return 35
|
|
4974
|
-
|
|
4975
|
-
elif encodeTypeName == "GS_1_AZTEC":
|
|
4976
|
-
return 81
|
|
4977
|
-
|
|
4978
|
-
elif encodeTypeName == "PDF_417":
|
|
4979
|
-
return 36
|
|
4980
|
-
|
|
4981
|
-
elif encodeTypeName == "MACRO_PDF_417":
|
|
4982
|
-
return 37
|
|
4983
|
-
|
|
4984
|
-
elif encodeTypeName == "GS_1_DATA_MATRIX":
|
|
4985
|
-
return 48
|
|
4986
|
-
|
|
4987
|
-
elif encodeTypeName == "MICRO_PDF_417":
|
|
4988
|
-
return 55
|
|
4989
|
-
|
|
4990
|
-
elif encodeTypeName == "GS_1_QR":
|
|
4991
|
-
return 56
|
|
4992
|
-
|
|
4993
|
-
elif encodeTypeName == "MAXI_CODE":
|
|
4994
|
-
return 57
|
|
4995
|
-
|
|
4996
|
-
elif encodeTypeName == "DOT_CODE":
|
|
4997
|
-
return 60
|
|
4998
|
-
|
|
4999
|
-
elif encodeTypeName == "AUSTRALIA_POST":
|
|
5000
|
-
return 38
|
|
5001
|
-
|
|
5002
|
-
elif encodeTypeName == "POSTNET":
|
|
5003
|
-
return 39
|
|
5004
|
-
|
|
5005
|
-
elif encodeTypeName == "PLANET":
|
|
5006
|
-
return 40
|
|
5007
|
-
|
|
5008
|
-
elif encodeTypeName == "ONE_CODE":
|
|
5009
|
-
return 41
|
|
5010
|
-
|
|
5011
|
-
elif encodeTypeName == "RM_4_SCC":
|
|
5012
|
-
return 42
|
|
5013
|
-
|
|
5014
|
-
elif encodeTypeName == "MAILMARK":
|
|
5015
|
-
return 66
|
|
5016
|
-
|
|
5017
|
-
elif encodeTypeName == "DATABAR_OMNI_DIRECTIONAL":
|
|
5018
|
-
return 43
|
|
5019
|
-
|
|
5020
|
-
elif encodeTypeName == "DATABAR_TRUNCATED":
|
|
5021
|
-
return 44
|
|
5022
|
-
|
|
5023
|
-
elif encodeTypeName == "DATABAR_LIMITED":
|
|
5024
|
-
return 45
|
|
5025
|
-
|
|
5026
|
-
elif encodeTypeName == "DATABAR_EXPANDED":
|
|
5027
|
-
return 46
|
|
5028
|
-
|
|
5029
|
-
elif encodeTypeName == "DATABAR_EXPANDED_STACKED":
|
|
5030
|
-
return 52
|
|
5031
|
-
|
|
5032
|
-
elif encodeTypeName == "DATABAR_STACKED":
|
|
5033
|
-
return 53
|
|
5034
|
-
|
|
5035
|
-
elif encodeTypeName == "DATABAR_STACKED_OMNI_DIRECTIONAL":
|
|
5036
|
-
return 54
|
|
5037
|
-
|
|
5038
|
-
elif encodeTypeName == "SINGAPORE_POST":
|
|
5039
|
-
return 47
|
|
5040
|
-
|
|
5041
|
-
elif encodeTypeName == "AUSTRALIAN_POSTE_PARCEL":
|
|
5042
|
-
return 49
|
|
5043
|
-
|
|
5044
|
-
elif encodeTypeName == "SWISS_POST_PARCEL":
|
|
5045
|
-
return 50
|
|
5046
|
-
|
|
5047
|
-
elif encodeTypeName == "PATCH_CODE":
|
|
5048
|
-
return 51
|
|
5049
|
-
|
|
5050
|
-
elif encodeTypeName == "CODE_32":
|
|
5051
|
-
return 58
|
|
5052
|
-
|
|
5053
|
-
elif encodeTypeName == "DATA_LOGIC_2_OF_5":
|
|
5054
|
-
return 59
|
|
5055
|
-
|
|
5056
|
-
elif encodeTypeName == "DUTCH_KIX":
|
|
5057
|
-
return 61
|
|
5058
|
-
|
|
5059
|
-
elif encodeTypeName == "UPCA_GS_1_CODE_128_COUPON":
|
|
5060
|
-
return 62
|
|
5061
|
-
|
|
5062
|
-
elif encodeTypeName == "UPCA_GS_1_DATABAR_COUPON":
|
|
5063
|
-
return 63
|
|
5064
|
-
|
|
5065
|
-
elif encodeTypeName == "CODABLOCK_F":
|
|
5066
|
-
return 64
|
|
5067
|
-
|
|
5068
|
-
elif encodeTypeName == "GS_1_CODABLOCK_F":
|
|
5069
|
-
return 65
|
|
5070
|
-
|
|
5071
|
-
elif encodeTypeName == "GS_1_COMPOSITE_BAR":
|
|
5072
|
-
return 67
|
|
5073
|
-
|
|
5074
|
-
elif encodeTypeName == "HIBC_CODE_39_LIC":
|
|
5075
|
-
return 68
|
|
5076
|
-
|
|
5077
|
-
elif encodeTypeName == "HIBC_CODE_128_LIC":
|
|
5078
|
-
return 69
|
|
5079
|
-
|
|
5080
|
-
elif encodeTypeName == "HIBC_AZTEC_LIC":
|
|
5081
|
-
return 70
|
|
5082
|
-
|
|
5083
|
-
elif encodeTypeName == "HIBC_DATA_MATRIX_LIC":
|
|
5084
|
-
return 71
|
|
5085
|
-
|
|
5086
|
-
elif encodeTypeName == "HIBCQRLIC":
|
|
5087
|
-
return 72
|
|
5088
|
-
|
|
5089
|
-
elif encodeTypeName == "HIBC_CODE_39_PAS":
|
|
5090
|
-
return 73
|
|
5091
|
-
|
|
5092
|
-
elif encodeTypeName == "HIBC_CODE_128_PAS":
|
|
5093
|
-
return 74
|
|
5094
|
-
|
|
5095
|
-
elif encodeTypeName == "HIBC_AZTEC_PAS":
|
|
5096
|
-
return 75
|
|
5097
|
-
|
|
5098
|
-
elif encodeTypeName == "HIBC_DATA_MATRIX_PAS":
|
|
5099
|
-
return 76
|
|
5100
|
-
|
|
5101
|
-
elif encodeTypeName == "HIBCQRPAS":
|
|
5102
|
-
return 77
|
|
5103
|
-
|
|
5104
|
-
elif encodeTypeName == "GS_1_DOT_CODE":
|
|
5105
|
-
return 78
|
|
5106
|
-
|
|
5107
|
-
elif encodeTypeName == "HAN_XIN":
|
|
5108
|
-
return 79
|
|
5109
|
-
|
|
5110
|
-
elif encodeTypeName == "GS_1_HAN_XIN":
|
|
5111
|
-
return 80
|
|
5112
|
-
|
|
5113
|
-
elif encodeTypeName == "MICRO_QR":
|
|
5114
|
-
return 83
|
|
5115
|
-
|
|
5116
|
-
elif encodeTypeName == "RECT_MICRO_QR":
|
|
5117
|
-
return 84
|
|
4891
|
+
def parse(encodeTypeName: str):
|
|
4892
|
+
"""!
|
|
4893
|
+
Returns the corresponding Enum value for the given name.
|
|
4894
|
+
If the name does not exist, raises a ValueError.
|
|
4895
|
+
"""
|
|
4896
|
+
try:
|
|
4897
|
+
return EncodeTypes[encodeTypeName]
|
|
4898
|
+
except KeyError:
|
|
4899
|
+
raise ValueError(f"Invalid encode type name: {encodeTypeName}")
|
|
5118
4900
|
|
|
5119
|
-
|
|
5120
|
-
|
|
4901
|
+
@staticmethod
|
|
4902
|
+
def parseToInt(encodeTypeName):
|
|
4903
|
+
intValue = EncodeTypes.parse(encodeTypeName).value
|
|
4904
|
+
return intValue
|
|
5121
4905
|
|
|
5122
4906
|
|
|
5123
4907
|
class PatchFormat(Enum):
|
|
@@ -5303,6 +5087,9 @@ class BarCodeImageFormat(Enum):
|
|
|
5303
5087
|
## Specifies the Scalable Vector Graphics (SVG) image format.
|
|
5304
5088
|
SVG = 7
|
|
5305
5089
|
|
|
5090
|
+
## Specifies the Portable Document Format (PDF) image format.
|
|
5091
|
+
PDF = 8
|
|
5092
|
+
|
|
5306
5093
|
##
|
|
5307
5094
|
|
|
5308
5095
|
|
|
@@ -78,11 +78,11 @@ class BarCodeReader(Assist.BaseJavaClass):
|
|
|
78
78
|
for area in areas:
|
|
79
79
|
if area is None or not isinstance(area, Assist.Rectangle):
|
|
80
80
|
raise Exception('All elements of areas should be instances of Rectangle class')
|
|
81
|
-
stringFormattedAreas.append(area.
|
|
81
|
+
stringFormattedAreas.append(area.__str__())
|
|
82
82
|
else:
|
|
83
83
|
if not isinstance(areas, Assist.Rectangle):
|
|
84
84
|
raise Exception('All elements of areas should be instances of Rectangle class')
|
|
85
|
-
stringFormattedAreas.append(areas.
|
|
85
|
+
stringFormattedAreas.append(areas.__str__())
|
|
86
86
|
|
|
87
87
|
javaAreasArray = jpype.JArray(jpype.JString)(len(stringFormattedAreas))
|
|
88
88
|
for i in range(len(javaAreasArray)):
|
|
@@ -1764,13 +1764,6 @@ class MaxiCodeExtendedParameters(Assist.BaseJavaClass):
|
|
|
1764
1764
|
"""
|
|
1765
1765
|
return MaxiCodeMode(self.getJavaClass().getMaxiCodeMode())
|
|
1766
1766
|
|
|
1767
|
-
def setMaxiCodeMode(self, maxiCodeMode: MaxiCodeMode) -> None:
|
|
1768
|
-
"""!
|
|
1769
|
-
Sets a MaxiCode encode mode.
|
|
1770
|
-
Default value: Mode4
|
|
1771
|
-
"""
|
|
1772
|
-
self.getJavaClass().setMaxiCodeMode(maxiCodeMode.value)
|
|
1773
|
-
|
|
1774
1767
|
def getMaxiCodeStructuredAppendModeBarcodeId(self) -> int:
|
|
1775
1768
|
"""!
|
|
1776
1769
|
Gets a MaxiCode barcode id in structured append mode.
|
|
@@ -1778,13 +1771,6 @@ class MaxiCodeExtendedParameters(Assist.BaseJavaClass):
|
|
|
1778
1771
|
"""
|
|
1779
1772
|
return int(self.getJavaClass().getMaxiCodeStructuredAppendModeBarcodeId())
|
|
1780
1773
|
|
|
1781
|
-
def setMaxiCodeStructuredAppendModeBarcodeId(self, value: int) -> None:
|
|
1782
|
-
"""!
|
|
1783
|
-
Sets a MaxiCode barcode id in structured append mode.
|
|
1784
|
-
Default value: 0
|
|
1785
|
-
"""
|
|
1786
|
-
self.getJavaClass().setMaxiCodeStructuredAppendModeBarcodeId(value)
|
|
1787
|
-
|
|
1788
1774
|
def getMaxiCodeStructuredAppendModeBarcodesCount(self) -> int:
|
|
1789
1775
|
"""!
|
|
1790
1776
|
Gets a MaxiCode barcodes count in structured append mode.
|
|
@@ -1792,13 +1778,6 @@ class MaxiCodeExtendedParameters(Assist.BaseJavaClass):
|
|
|
1792
1778
|
"""
|
|
1793
1779
|
return int(self.getJavaClass().getMaxiCodeStructuredAppendModeBarcodesCount())
|
|
1794
1780
|
|
|
1795
|
-
def setMaxiCodeStructuredAppendModeBarcodesCount(self, value: int) -> None:
|
|
1796
|
-
"""!
|
|
1797
|
-
Sets a MaxiCode barcodes count in structured append mode.
|
|
1798
|
-
Default value: -1
|
|
1799
|
-
"""
|
|
1800
|
-
self.getJavaClass().setMaxiCodeStructuredAppendModeBarcodesCount(value)
|
|
1801
|
-
|
|
1802
1781
|
def __eq__(self, other: MaxiCodeExtendedParameters) -> bool:
|
|
1803
1782
|
"""!
|
|
1804
1783
|
Returns a value indicating whether this instance is equal to a specified MaxiCodeExtendedParameters value.
|
|
@@ -1811,10 +1790,11 @@ class MaxiCodeExtendedParameters(Assist.BaseJavaClass):
|
|
|
1811
1790
|
return NotImplemented
|
|
1812
1791
|
return bool(self.getJavaClass().equals(other.getJavaClass()))
|
|
1813
1792
|
|
|
1814
|
-
|
|
1793
|
+
|
|
1794
|
+
def __hash__(self) -> int:
|
|
1815
1795
|
"""!
|
|
1816
|
-
Returns the hash code for
|
|
1817
|
-
@return
|
|
1796
|
+
Returns the hash code for the current instance.
|
|
1797
|
+
@return A hash code for the current object.
|
|
1818
1798
|
"""
|
|
1819
1799
|
return int(self.getJavaClass().getHashCode())
|
|
1820
1800
|
|
|
@@ -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-
|
|
6
|
+
__barcode_jar_path__ = __asposebarcode_dir__ + "/jlib/aspose-barcode-python-25.1.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.11.0 → aspose-barcode-for-python-via-java-25.1.0}/MANIFEST.in
RENAMED
|
File without changes
|
{aspose-barcode-for-python-via-java-24.11.0 → aspose-barcode-for-python-via-java-25.1.0}/README.md
RENAMED
|
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.11.0 → aspose-barcode-for-python-via-java-25.1.0}/setup.cfg
RENAMED
|
File without changes
|