The barcode element works similar to text element, except is inserts a barcode instead of text.
Compared to the text element, there are 2 differences:
1.The barcode attributes are set via the barcode style.
2.The barcode type field is used for selecting the specific barcode type.
Supported Barcode types
The supported barcode types are listed below.
Code 39
Code 128
Datamatrix
Datamatrix GS1 (for ZPL printing only)
EAN-8
EAN-13
GS1-128
Interleaved 2 of 5
ITF-14
PDF417
QR
UPC-A
UPC-E
(For some print data streams, there are limitations to this list - refer to the mime types for details).
For the GS1-128 barcode you might need to insert the FNC1 char to delimit fields of varying length. To insert FNC1 you need to insert the character, ‘|’.
For the 2D barcodes like PDF417 and QR you might want to insert unprintable characters e.g. Hex 1D, 1E and similar as delimiters. If you want to insert such texts you can e.g. define variables with these hex values via the decode option, and concat the variable in the string, that you convert into the barcode:
Define a variable with the value hex 1D:
Use it in an Xpath expression to separate 'abc' and 'def' with the hex character, 1D:
InterFormNG can output QR barcodes with the size and layout as required for Swiss invoices. To output such a barcode you simply insert a barcode element with the type: QR_CH.
The barcode has the right size and the Swiss flag in the middle as required, but you need yourself to ensure, that the data, that you put into the barcode fits the requirements as this is not validated in InterFormNG.