
## ComplexBarcodeGenerator class

ComplexBarcodeGenerator for backend complex barcode (e.g. SwissQR) images generation.

```js
new ComplexBarcodeGenerator(complexCodetext)
```

Creates an instance of ComplexBarcodeGenerator.

| Parameter | Description |
| --- | --- |
| complexCodetext | Complex codetext |

**Example:**

```js
This sample shows how to create and save a SwissQR image.
   let swissQRCodetext = new SwissQRCodetext(null);
   swissQRCodetext.getBill().setAccount("Account");
   swissQRCodetext.getBill().setBillInformation("BillInformation");
   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([new AlternativeScheme("AlternativeSchemeInstruction1"),new AlternativeScheme("AlternativeSchemeInstruction2")]);
   swissQRCodetext.getBill().setDebtor(new Address(null));
   swissQRCodetext.getBill().getDebtor().setName("Debtor.Name");
   swissQRCodetext.getBill().getDebtor().setAddressLine1("Debtor.AddressLine1");
   swissQRCodetext.getBill().getDebtor().setAddressLine2("Debtor.AddressLine2");
   swissQRCodetext.getBill().getDebtor().setCountryCode("Lux");
   let cg = new ComplexBarcodeGenerator(swissQRCodetext);
   let res = cg.generateBarCodeImage(BarcodeImageFormat.PNG);
```

## Methods

| Name | Description |
| --- | --- |
| [generateBarCodeImage()](#generatebarcodeimage) | Generates complex barcode image under current settings. |
| [getParameters()](#getparameters) | Generation parameters. |
| [save(filePath, format)](#save) | Generates and saves complex barcode image under current settings. |

### generateBarCodeImage() {#generatebarcodeimage}

Generates complex barcode image under current settings.

**Returns:** Base64 presentation of image.

### getParameters() {#getparameters}

Generation parameters.

### save(filePath, format) {#save}

Generates and saves complex barcode image under current settings.

| Parameter | Description |
| --- | --- |
| filePath | Path to save to. |
| format | BarCodeImageFormat(PNG, BMP, JPEG, GIF) |
