2

I have ZPL code as follows:

^XA^CI27^LH0,0^BY2^FO250,50^B3N,N,25,N,N^FDU0772287 ^FS
^FO30,50^A0N,35,35^FD$9.99 ^FS
^FO200,80^A0N,25,25^FH^FDBatch 14657, Item 772287K, 2013-May-29 ^FS
^FO30,115^A0N,25,25^FH^FDAccessories for stroller/carseat, Acton ^FS
^FO550,145^A0N,25,25^FH^FDSize: Preschool ^FS
^FO30,145^A0N,25,25^FH^FDDenim, Maternity ^FS^XZ

When sending it to my Zebra GK420d via POS for .NET & Zebra OPOS, this label ends up taking two 4 inch x 1 inch labels instead of just one. Only one line prints on the second label. There is more than enough room on the label to print this text.

  • Remove the ^CI27 and the ^FH and you will not see this behaviour.
  • Remove almost any one of the individual pieces of text and you will not see this behaviour.
  • Change the label at 200,80 to start at 30,80 and you won't see this behaviour.
  • Change Acton to say Act and you won't see this behaviour.

However, in some of the above scenarios, although it prints on one label, you'll sometimes discover a ^FS appear somewhere, in the standard font (smaller than ^A0N,25,25). In the last variant (and a bunch of others), you'll end up with the end of one of the lines of text written, in the default font, overwriting the start of another line. You'll also sometimes see a ^FS appear in the middle of nowhere.

Because I see this bug with only some textual strings and not others, I suspected some kind of layout bug due to font size calculations, so I tried changing all the text on the label to a W or an I and it does not make any difference.

I'm stumped; this makes no sense to me and it doesn't follow the documentation I have seen online. Furthermore, everything explodes (fonts are ignored, text is overwritten, prints on four stickers, etc.) when:

  • a linebreak (Windows) is not put after every ^FS
  • a linebreak is put anywhere else
  • a space is not put before every ^FS

Do I have a bug in my ZPL? Am I finding a weird bug in the Zebra OPOS library or POS for .NET? Is it just my printer?

Jason Kealey
  • 7,988
  • 11
  • 42
  • 55
  • Does removing just the ^FH have any effect? The ^FH is used so the interpreter knows that a hexadecimal value will be coming in the ^FD. The default indicator is an _ , but you can specify an indicator also. Since you are not specifying a indicator and not using the _ I don't see that it is necessary. Of course adding it shouldn't have the effect that it is having... – Elton Saunders May 31 '13 at 14:32
  • The problem still happens when the ^FH are removed. In this particular example, nothing is escaped, but escaping is required for the French translations of this label. Simply changing the code page (^CI27) causes this issue - on some labels only. Removing it causes the the printer to prints on one label. – Jason Kealey Jun 01 '13 at 16:41
  • Have you tried sending this label directly thru the printer not using the library? I tried it real quick on a different ZPL printer and it looks fine. The "Random ^FS appearing" comment is a little weird, maybe the library is not sending all the bytes across? Or escaping it weird? – Ovi Tisler Jun 06 '13 at 12:23
  • 1
    I just tried using this https://km.zebra.com/kb/index?page=content&id=SA301&actp=LIST_POPULAR to send the ZPL and it prints fine. I can thus confirm that this appears to be a bug in the Zebra OPOS library and/or OPOS for .NET. – Jason Kealey Jun 06 '13 at 20:33

0 Answers0