Please enable JavaScript to view this site.

InterFormNG2 Manual

Navigation: Designer > Design elements > Barcode element

Insert line breaks in a 2D barcode

Scroll Prev Top Next More

You have two options, if you want to insert a line break in a 2D barcode (like PDF417, Datamatrix and QR barcodes):

 

1.If you want to insert a simple line break with the full Carriage Return (CR) and Line Feed (LF), then you can insert a line break by defining a string and press Enter while editing the string.

2.You can also specifically specify the hex values of each character.

 

 

Insert a simple line break in a 2D barcode

To insert a simple line break in a 2D barcode you can e.g. define a variable, that contains a single character, that is a line break.

 

You can do that by defining the variable in this way:

 

NG2VariableLineBreak0001

 

The value for the variable, LineBreak is defined above by typing two single quotes and pressing Enter after the first one.

 

Now you can use the variable (if you insert the barcode after the variable update) e.g. with the concat Xpath function like this:

 

concat('abc',$LineBreak,'def')

 

NG2VariableLineBreak0002

 

 

Insert a line break as either CR, LF or both

You can also insert the line break as either CR (Carriage Return), LF (Line Feed) or both in a barcode. To do that you first need to know the hex codes of both characters, and they are:

 

LF, Line Feed has the hex value, 0A.

CR, Carriage Return has the hex value, 0D.

 

You can use the special built in function, ng:hexToUtf8() to define a variable e.g. $LineFeed as either LF or CR or both.

 

If you want to insert CRLF you can change the assignment of the variable above to this:

ng:hexToUtf8('0D0A')

 

like so:

 

NG2BarcodeLineBreaks0002

 

Please notice, that the output is not shown correctly in the result view, so you need to do a preview to see the final, correct result.

 

The result view might look like this (if you output as a text):

 

NG2BarcodeLineBreaks0003

But the preview and final result looks like this:

 

NG2BarcodeLineBreaks0004