Formatting multi-line text

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

Anonymous (not verified)
Hi Srikanth, You have to use


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

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Srikanth Reddy
Hi Robin,Thanks for your

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

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Samantha Corn
Hi Srikanth,Sorry for the

Hi Srikanth,

Sorry for the delay in response, but the reason this didn't work is because of the ^FH\ commands. That command sets \ as the field hexadecimal indicator, and is meant to be used in conjunction with the hex for a newline, not the & shortcut. Removing that will allow you to print multi-line:

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^FDCustomer PO #:^FS

^FT740,761^A0B,34,33^FDOrder #:^FS

^FT740,446^A0B,34,33^FD999999^FS

^FT640,446^A0B,34,33^FDTAS TEST^FS

^FT308,707^FB490,4,^A0B,39,38^FD1234 TEST ST\&SUITE# 567\&LOS ANGELES,CA 90045^FS

^PQ1,0,1,Y^XZ

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Log in to post comments