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

ComplexBarcodeGenerator for backend complex barcode (e.g. More...

Inherits BaseJavaClass.

Public Member Functions

def __init__ (self, IComplexCodetext complexCodetext)
 Creates an instance of ComplexBarcodeGenerator. More...
 
Image.Image generateBarCodeImage (self)
 Generates complex barcode image under current settings. More...
 
Generation.BaseGenerationParameters getParameters (self)
 Generation parameters. More...
 
None init (self)
 
None save (self, str imagePath, Generation.BarCodeImageFormat imageFormat)
 Save barcode image to specific file in specific format. More...
 
- Public Member Functions inherited from BaseJavaClass
None __init__ (self, javaClass)
 
def getJavaClass (self)
 
str getJavaClassName (self)
 
bool isNull (self)
 
None printJavaClassName (self)
 
None setJavaClass (self, javaClass)
 

Static Public Attributes

string javaClassName = "com.aspose.mw.barcode.complexbarcode.MwComplexBarcodeGenerator"
 

Additional Inherited Members

- Public Attributes inherited from BaseJavaClass
 javaClass
 
 javaClassName
 

Detailed Description

ComplexBarcodeGenerator for backend complex barcode (e.g.

SwissQR) images generation. This sample shows how to create and save a SwissQR image.

swissQRCodetext = ComplexBarcode.SwissQRCodetext(None)
swissQRCodetext.getBill().setAccount("CH450023023099999999A")
swissQRCodetext.getBill().setBillInformation("BillInformation")
swissQRCodetext.getBill().setAmount(1024)
swissQRCodetext.getBill().getCreditor().setName("Creditor.Name")
swissQRCodetext.getBill().getCreditor().setAddressLine1("Creditor.AddressLine1")
swissQRCodetext.getBill().getCreditor().setAddressLine2("Creditor.AddressLine2")
swissQRCodetext.getBill().getCreditor().setCountryCode("Nl")
swissQRCodetext.getBill().setUnstructuredMessage("UnstructuredMessage")
swissQRCodetext.getBill().setReference("Reference")
swissQRCodetext.getBill().setAlternativeSchemes([ComplexBarcode.AlternativeScheme(
"AlternativeSchemeInstruction1"), ComplexBarcode.AlternativeScheme("AlternativeSchemeInstruction2")])
swissQRCodetext.getBill().setDebtor(ComplexBarcode.Address())
swissQRCodetext.getBill().getDebtor().setName("Debtor.Name")
swissQRCodetext.getBill().getDebtor().setAddressLine1("Debtor.AddressLine1")
swissQRCodetext.getBill().getDebtor().setAddressLine2("Debtor.AddressLine2")
swissQRCodetext.getBill().getDebtor().setCountryCode("LU")
cg = ComplexBarcode.ComplexBarcodeGenerator(swissQRCodetext)
res = cg.generateBarCodeImage()

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
IComplexCodetext  complexCodetext 
)

Creates an instance of ComplexBarcodeGenerator.

Parameters
complexCodetextComplex codetext

Member Function Documentation

◆ generateBarCodeImage()

Image.Image generateBarCodeImage (   self)

Generates complex barcode image under current settings.

Parameters
valueof BarCodeImageFormat (PNG, BMP, JPEG, GIF, TIFF) default value is BarCodeImageFormat.PNG
Returns
Pillow Image object of barcode image

◆ getParameters()

Generation.BaseGenerationParameters getParameters (   self)

Generation parameters.

◆ init()

None init (   self)

Reimplemented from BaseJavaClass.

◆ save()

None save (   self,
str  imagePath,
Generation.BarCodeImageFormat  imageFormat 
)

Save barcode image to specific file in specific format.

Parameters
imagePathPath to save to.
imageFormatof BarCodeImageFormat enum (PNG, BMP, JPEG, GIF, TIFF)
generator = Generation.BarcodeGenerator(
Generation.EncodeTypes.CODE_128, "12345678")
generator.save(path_to_save, Generation.BarCodeImageFormat.PNG)

Member Data Documentation

◆ javaClassName

string javaClassName = "com.aspose.mw.barcode.complexbarcode.MwComplexBarcodeGenerator"
static