Reputation: 11
I have a question related to this topic: New line in Zebra ZPL. I want to print a serial number, which is longer than the label. There shouldn't be a hyphen in this seral number.
It is printed by a PLC, which gets the format as ZPL from a PC. I get the ZPL file only, if the format changes. The data which have to be printed on the label will be given as variables.
I can't change the communication configuration (e.g. connect the printer directly to the PLC or change the program in the PC). This means, I can't split the serial number into two lines (like I did in another project). But, of course, I can change the PLC program, but it must be changeable to new formats without changing the PLC program again. So from my point of view, splitting the code in the PLC program is not an option.
Until now, I only had to possibility to change the code, to have automatic word wrap with a hyphen or split the serial number into two lines.
Hopefully someone has a suggestion.
With kind regards,
Alexander Härtel
Upvotes: 1
Views: 658
Reputation: 78210
Use the ^FB
command (field box).
The first argument is the width in dots (always in dots, this is the only command that ignores ^CU
units of measurement (which is an undocumented fact)), the second argument is the maximum number of lines the box can have. (There are other arguments too.)
^FO100,350
^FB100,2
^FD1234567890^FS
Upvotes: 1