Aspose.BarCode for Python via Java  24.11
Aspose.Barcode for Python via Java Generation and Recognition API docs
OneDExtendedParameters Class Reference

Stores special data of 1D recognized barcode like separate codetext and checksum. More...

Inherits BaseJavaClass.

Public Member Functions

def __init__ (self, javaClass)
 
bool __eq__ (self, OneDExtendedParameters other)
 Returns a value indicating whether this instance is equal to a specified OneDExtendedParameters value. More...
 
int __hash__ (self)
 Returns the hash code for the current instance. More...
 
str __str__ (self)
 Returns a human-readable string representation of this OneDExtendedParameters. More...
 
str getCheckSum (self)
 Gets the checksum for 1D barcodes. More...
 
str getValue (self)
 Gets the codetext of 1D barcodes without checksum. More...
 
None init (self)
 
bool isEmpty (self)
 Tests whether all parameters have only default values. More...
 
- Public Member Functions inherited from BaseJavaClass
def getJavaClass (self)
 
str getJavaClassName (self)
 
bool isNull (self)
 
None printJavaClassName (self)
 
None setJavaClass (self, javaClass)
 

Additional Inherited Members

- Public Attributes inherited from BaseJavaClass
 javaClass
 
 javaClassName
 

Detailed Description

Stores special data of 1D recognized barcode like separate codetext and checksum.

This sample shows how to get 1D barcode value and checksum

generator = Generation.BarcodeGenerator(Generation.EncodeTypes.EAN_13, "1234567890128")
generator.save(self.image_path_to_save, Generation.BarCodeImageFormat.PNG)
reader = Recognition.BarCodeReader(self.image_path_to_save, None, Recognition.DecodeType.EAN_13)
for result in reader.readBarCodes():
print(f"\nBarCode Type: {result.getCodeTypeName()}")
print(f"BarCode CodeText: {result.getCodeText()}")
print(f"BarCode Value: {result.getExtended().getOneD().getValue()}")
print(f"BarCode Checksum: {result.getExtended().getOneD().getCheckSum()}")

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  javaClass 
)

Reimplemented from BaseJavaClass.

Member Function Documentation

◆ __eq__()

bool __eq__ (   self,
OneDExtendedParameters  other 
)

Returns a value indicating whether this instance is equal to a specified OneDExtendedParameters value.

Parameters
obj An object value to compare to this instance.
Returns
: True if obj has the same value as this instance, otherwise False.

◆ __hash__()

int __hash__ (   self)

Returns the hash code for the current instance.

Returns
A hash code for the current object.

◆ __str__()

str __str__ (   self)

Returns a human-readable string representation of this OneDExtendedParameters.

Returns
: A string that represents this OneDExtendedParameters.

◆ getCheckSum()

str getCheckSum (   self)

Gets the checksum for 1D barcodes.

Value: The checksum for 1D barcode.

◆ getValue()

str getValue (   self)

Gets the codetext of 1D barcodes without checksum.

Value: The codetext of 1D barcodes without checksum.

◆ init()

None init (   self)

Reimplemented from BaseJavaClass.

◆ isEmpty()

bool isEmpty (   self)

Tests whether all parameters have only default values.

Returns
: Returns True if all parameters have only default values, otherwise False.