Formatting multi-line text

S Srikanth Reddy 3 years 7 months ago
2635 2 0

Hi,
I am trying to print a label but the new line char "\&" doesn't seem to be working in my zpl code.
I am not sure what I am missing
Any help is appreciated.
 
CT~~CD,~CC^~CT~
^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR6,6~SD10^JUS^LRN^CI0^XZ
^XA
^MMT
^PW812
^LL1015
^LS0
^FT640,761^A0B,34,33^FH\^FDCustomer PO #:^FS
^FT740,761^A0B,34,33^FH\^FDOrder #:^FS
^FT740,446^A0B,34,33^FH\^FD999999^FS
^FT640,446^A0B,34,33^FH\^FDTAS TEST^FS
^FT308,707^A0B,39,38^FH\^FD1234 TEST ST\&SUITE# 567\&LOS ANGELES,CA 90045^FS
^PQ1,0,1,Y^XZ
 
Thanks & regards

Please Register or Login to post a reply

2 Replies

Y Yanis Dalabiras

Hi Srikanth, You have to use a multi-line ZPL command (^FB or ^TB) to show multiple lines of text with one data field:

CT~~CD,~CC^~CT~
^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR6,6~SD10^JUS^LRN^CI0^XZ
^XA
^MMT
^PW812
^LL1015
^LS0
^FT640,761^A0B,34,33^FH\^FDCustomer PO #:^FS
^FT740,761^A0B,34,33^FH\^FDOrder #:^FS
^FT740,446^A0B,34,33^FH\^FD999999^FS
^FT640,446^A0B,34,33^FH\^FDTAS TEST^FS
^FT308,707^FB490,4,^A0B,39,38^FH\^FD1234 TEST ST\&SUITE# 567\&LOS ANGELES,CA 90045^FS
^PQ1,0,1,Y^XZ

S Srikanth Reddy

Hi Robin,

Thanks for your reply.
Yes I tried, but for some reason "\&" is not being reflected as a newline character.

After the change the output looks as below, the customer PO # and Order # printed as expected

1234 TEST ST&SUITE#
567&LOS ANGELS,CA 90045

Thanks

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