Aspose.Barcode for Python via Java Generation and Recognition API docs
asposebarcode.Recognition.BarcodeSettings Class Reference

Inherits asposebarcode.Assist.BaseJavaClass.

Public Member Functions

def __init__ (self, settings)
 BarcodeSettings copy constructor :param settings: settings The source of the data. More...
 
def init (self)
 
def getChecksumValidation (self)
 Enable checksum validation during recognition for 1D and Postal barcodes. More...
 
def setChecksumValidation (self, value)
 
def getStripFNC (self)
 
def setStripFNC (self, value)
 
def getDetectEncoding (self)
 
def setDetectEncoding (self, value)
 
def getAustraliaPost (self)
 
- Public Member Functions inherited from asposebarcode.Assist.BaseJavaClass
def getJavaClass (self)
 
def setJavaClass (self, javaClass)
 
def getJavaClassName (self)
 
def isNull (self)
 
def printJavaClassName (self)
 

Static Public Member Functions

def construct (javaClass)
 BarcodeSettings copy constructor :param settings The source of the data. More...
 

Static Public Attributes

string javaClassName = "com.aspose.mw.barcode.recognition.MwBarcodeSettings"
 

Additional Inherited Members

- Public Attributes inherited from asposebarcode.Assist.BaseJavaClass
 javaClass
 
 javaClassName
 

Constructor & Destructor Documentation

◆ __init__()

def asposebarcode.Recognition.BarcodeSettings.__init__ (   self,
  settings 
)

BarcodeSettings copy constructor :param settings: settings The source of the data.

Reimplemented from asposebarcode.Assist.BaseJavaClass.

Member Function Documentation

◆ construct()

def asposebarcode.Recognition.BarcodeSettings.construct (   javaClass)
static

BarcodeSettings copy constructor :param settings The source of the data.

◆ getAustraliaPost()

def asposebarcode.Recognition.BarcodeSettings.getAustraliaPost (   self)
:return: The AustraliaPost decoding parameters which make influence on recognized data of AustraliaPost symbology

◆ getChecksumValidation()

def asposebarcode.Recognition.BarcodeSettings.getChecksumValidation (   self)

Enable checksum validation during recognition for 1D and Postal barcodes.

Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar, PatchCode, Pharmacode, DataLogic2of5 Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, ItalianPost25, Matrix2of5, MSI, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies

Example

generator = new BarcodeGenerator(EncodeTypes.EAN_13, "1234567890128")
generator.save("c:/test.png", BarcodeImageFormat.PNG)
reader = new BarCodeReader("c:/test.png", DecodeType.EAN_13)
//checksum disabled
reader.getBarcodeSettings().setChecksumValidation(ChecksumValidation.OFF)
for result in reader.readBarCodes():
print ("BarCode CodeText: " +result.getCodeText())
print ("BarCode Value: " + result.getExtended().getOneD().getValue())
print ("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum())
reader = new BarCodeReader(@"c:\test.png", DecodeType.EAN_13)
//checksum enabled
reader.getBarcodeSettings().setChecksumValidation(ChecksumValidation.ON)
for result in reader.readBarCodes():
print ("BarCode CodeText: " + result.CodeText)
print ("BarCode Value: " + result.getExtended().getOneD().getValue())
print ("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum())

:return:Enable checksum validation during recognition for 1D and Postal barcodes.

◆ getDetectEncoding()

def asposebarcode.Recognition.BarcodeSettings.getDetectEncoding (   self)
 The flag which force engine to detect codetext encoding for Unicode codesets. Default value is true.

 Example

 \code
 generator = new BarcodeGenerator(EncodeTypes.QR, "Слово"))
 im = generator.generateBarcodeImage(BarcodeImageFormat.PNG)

 //detects encoding for Unicode codesets is enabled
 reader = new BarCodeReader(im, DecodeType.QR)
 reader.getBarcodeSettings().setDetectEncoding(true)
 for result in reader.readBarCodes():
     print ("BarCode CodeText: " +result.getCodeText())

 //detect encoding is disabled
 reader = new BarCodeReader(im, DecodeType.QR)
 reader.getBarcodeSettings().setDetectEncoding(false)
 for result in reader.readBarCodes():
     print ("BarCode CodeText: " +result.getCodeText())
\endcode

:return:The flag which force engine to detect codetext encoding for Unicode codesets

◆ getStripFNC()

def asposebarcode.Recognition.BarcodeSettings.getStripFNC (   self)
Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.

Example

\code
generator = new BarcodeGenerator(EncodeTypes.GS_1_CODE_128, "(02)04006664241007(37)1(400)7019590754")
generator.save("c:/test.png", BarcodeImageFormat.PNG)
reader = new BarCodeReader("c:/test.png", DecodeType.CODE_128)

//StripFNC disabled
reader.getBarcodeSettings().setStripFNC(false)
for result in reader.readBarCodes():
    print ("BarCode CodeText: " +result.getCodeText())

reader = new BarCodeReader("c:/test.png", DecodeType.CODE_128)

//StripFNC enabled
reader.getBarcodeSettings().setStripFNC(true)
for result in reader.readBarCodes():
    print ("BarCode CodeText: " +result.getCodeText())

\endcode

:return: Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.

◆ init()

def asposebarcode.Recognition.BarcodeSettings.init (   self)

◆ setChecksumValidation()

def asposebarcode.Recognition.BarcodeSettings.setChecksumValidation (   self,
  value 
)
Enable checksum validation during recognition for 1D and Postal barcodes.
Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible.
Checksum never used: Codabar, PatchCode, Pharmacode, DataLogic2of5
Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, ItalianPost25, Matrix2of5, MSI, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN
Checksum always used: Rest symbologies

Example

\code
generator = new BarcodeGenerator(EncodeTypes.EAN_13, "1234567890128")
generator.save("c:/test.png", BarcodeImageFormat.PNG)
reader = new BarCodeReader("c:/test.png", DecodeType.EAN_13)
//checksum disabled
reader.getBarcodeSettings().setChecksumValidation(ChecksumValidation.OFF)
for result in reader.readBarCodes():
     print ("BarCode CodeText: " +result.getCodeText())
     print ("BarCode Value: " + result.getExtended().getOneD().getValue())
     print ("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum())

reader = new BarCodeReader(@"c:\test.png", DecodeType.EAN_13)
//checksum enabled
reader.getBarcodeSettings().setChecksumValidation(ChecksumValidation.ON)
for result in reader.readBarCodes():
     print ("BarCode CodeText: " + result.CodeText)
     print ("BarCode Value: " + result.getExtended().getOneD().getValue())
     print ("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum())

\endcode
:param value: Enable checksum validation during recognition for 1D and Postal barcodes.

◆ setDetectEncoding()

def asposebarcode.Recognition.BarcodeSettings.setDetectEncoding (   self,
  value 
)
 The flag which force engine to detect codetext encoding for Unicode codesets. Default value is true.

 Example

\code
 generator = new BarcodeGenerator(EncodeTypes.QR, "Слово"))
 im = generator.generateBarcodeImage(BarcodeImageFormat.PNG)

 //detects encoding for Unicode codesets is enabled
   reader = new BarCodeReader(im, DecodeType.QR)
 reader.getBarcodeSettings().setDetectEncoding(true)
 for result in reader.readBarCodes():
     print ("BarCode CodeText: " +result.getCodeText())

 //detect encoding is disabled
 reader = new BarCodeReader(im, DecodeType.QR)
 reader.getBarcodeSettings().setDetectEncoding(false)
 for result in reader.readBarCodes():
     print ("BarCode CodeText: " +result.getCodeText())
\endcode

:param value: The flag which force engine to detect codetext encoding for Unicode codesets

◆ setStripFNC()

def asposebarcode.Recognition.BarcodeSettings.setStripFNC (   self,
  value 
)
 Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.

Example

\code
 generator = new BarcodeGenerator(EncodeTypes.GS_1_CODE_128, "(02)04006664241007(37)1(400)7019590754")
 generator.save("c:/test.png", BarcodeImageFormat.PNG)
 reader = new BarCodeReader("c:/test.png", DecodeType.CODE_128)

 //StripFNC disabled
 reader.getBarcodeSettings().setStripFNC(false)
 for result in reader.readBarCodes():
     print ("BarCode CodeText: " +result.getCodeText())

 reader = new BarCodeReader("c:/test.png", DecodeType.CODE_128)

 //StripFNC enabled
 reader.getBarcodeSettings().setStripFNC(true)
 for result in reader.readBarCodes():
     print ("BarCode CodeText: " +result.getCodeText())

 \endcode

 :param: value  Strip FNC1, FNC2, FNC3 characters from codetext. Default value is false.

Member Data Documentation

◆ javaClassName

string asposebarcode.Recognition.BarcodeSettings.javaClassName = "com.aspose.mw.barcode.recognition.MwBarcodeSettings"
static