c# ZPL string command to adjust left position of stored label

I am using the zpl string below to send data to and print a stored label on our ZT410 printer. Everything is working except the "^LS" command. It is very strange because the printer settings for left position reflect the data I provide( example -23). The problem is the label is not adjusted. The "^LT" command works. I can change it  and the label moves accordingly. Any help would be appreciated. Thanks

            string ZPL_STRING = string.Format(@"^XA                      

                                ^XFE:csa.ZPL                                                       

                                ^FN12^FD{0}^FS

                                ^FN11^FD{1}^FS

                                ^FN13^FD{2}^FS

                                ^FN14^FD{3}^FS

                                ^LS-23^FS 

                                ^LT12^FS                           

                                ^PQ{4}                          

                                ^XZ

                                ",

                                 data1,

                                 data2,

                                 data3,

                                 data4,

                                 data5

                                 );

Anonymous (not verified)
Hi James, ^LS is one of those

Hi James,

^LS is one of those commands that is best sent separately before your main print job. Try changeing the ZPL_STRING to:

string ZPL_STRING = string.Format(@"

                                ^XA^LS-23^XZ

                                ^XA                     

                                ^XFE:csa.ZPL                                                      

                                ^FN12^FD{0}^FS

                                ^FN11^FD{1}^FS

                                ^FN13^FD{2}^FS

                                ^FN14^FD{3}^FS

                                ^LT12^FS                          

                                ^PQ{4}                         

                                ^XZ

                                ",

                                 data1,

                                 data2,

                                 data3,

                                 data4,

                                 data5

                                 );

I tested it with the following string:

^XA^DFE:test.zpl^FO0,0^GB400,200,5^FS^XZ^XA^XFE:test.zpl^XZ^XA^LS-23^XZ^XA^XFE:test.zpl^XZ

This prints out 2 labels, each with a box, but the second is shifted from the first.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


James Morris
Robin thanks for getting back

Robin thanks for getting back with me. I tried the string above with no luck. With the ^LS before the rest of the code the printer setting did not get updated. It would get updated the other way but the "left position" setting on the printer seems to be ignored. I can adjust the ^LT from the code and it would update the "label top" setting on the printer and would be reflected in the label I was printing.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Hi James, In this case, I'm

Hi James, In this case, I'm going to recommend contacting our Technical Support.  Sorry.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments