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 equals (self, OneDExtendedParameters obj)
 Returns a value indicating whether this instance is equal to a specified OneDExtendedParameters value. More...
 
str getCheckSum (self)
 Gets the checksum for 1D barcodes. More...
 
str getValue (self)
 Gets the codetext of 1D barcodes without checksum. More...
 
int hashCode (self)
 Returns the hash code for this instance. More...
 
None init (self)
 
bool isEmpty (self)
 Tests whether all parameters have only default values. More...
 
str toString (self)
 Returns a human-readable string representation of this OneDExtendedParameters. 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

◆ equals()

bool equals (   self,
OneDExtendedParameters  obj 
)

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.

◆ 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.

◆ hashCode()

int hashCode (   self)

Returns the hash code for this instance.

Returns
: A 32-bit signed integer hash code.

◆ 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.

◆ toString()

str toString (   self)

Returns a human-readable string representation of this OneDExtendedParameters.

Returns
: A string that represents this OneDExtendedParameters.