Carriage return does not work in ^FB command

// Expert user has replied.
R Rudolf Simon 2 years ago
12 3 0

Hi there,
we do have two ZT411 printers to get our labels printed from ABAS ERP software. I switched from Jasper Reports to use directly ZPL commands.
So far everything works fine, except the ^FB command. According to ZPL II Programming Guide, an \& within the string, should make an carriage return. But it is not working.

Thats a part of my code:

^FT552,512^A0B,28,28^FH\^FDParts^FS
^FT749,512^A0B,25,24^FB250,6,0,L,0
^FDTest1 \&Test2 \&Test3 \&Test4 ^FS

Any help would be welcome. Thanks a lot.

Please Register or Login to post a reply

3 Replies

S Steven Si

Try adding the home location, i.e., ^HL0,0

^XA
^HL0,0
^FT552,512^A0B,28,28^FH\^FDParts^FS
^FT749,512^A0B,25,24^FB250,6,0,L,0
^FDTest1 \&Test2 \&Test3 \&Test4 ^FS
^XZ

 

R Rudolf Simon

Thanks SSi1 for your hint. But I do have all those settings already made.

As I had explained, the newline does not work as described in the programming documents.
I have now added a ^FH Field Hexadecimal Indicator and now the line break is made in the text box.
My code looks now like that:

^FT552,512^A0B,28,28^FH\^FDParts^FS
^FT755,512^FB250,7,4,L,0^A0B,25,24^FH^FDTest1 _5c_26 Test2 _5c_26 Test3 _5c_26 Test4 ^FS

Again, thanks for the help.

S Steven Si

The hexadecimal is the valid alternative. Glad to see you made it work. As described on the ZPL Programming Guide, the \& should work as well for carriage return and newline for the ^FB command. If it doesn't work in your case, it might be because the backslash has been redefined as something else in your ZPL script.

CONTACT
Can’t find what you’re looking for?