ZPL - Zebra Concatenate 2 values

1.2k Views Asked by At

I would like to concatenate 2 values in the Zebra Programming Language (ZPL) Var FN3 contains: 123456

This line currently prints the value 123456

^FO260,90^A0N,70,50^FN3^FS

^FO: field orientation, with coordinates. ^AON: font type and size ^FN3: variable ^FS: field stop

I tried this:

^FO260,90^A0N,70,50^FDP^FN3^FS

So we want to have printed: P123456

I cannot find any concatenate function or how to do this in the label. Any tips or tricks or functions I do not know about?

1

There are 1 best solutions below

0
On

The usual way to achieve that result is to use ^FT rather than ^FO, for example:

^FT260,160^A0N,70,50^FDP^FS^FT^A0N,70,50^FN3^FS

Note the second ^FT with empty parameters. That indicates to continue formatting the text where the last ^FT left off.

Unfortunately, using ^FT means you have to change your coordinates, specifically, your y values. ^FO positions from the upper left corner. ^FT positions from the baseline of the text.