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()