^GB · Graphic Box
Draws lines or boxes.
Syntax and practical example
^GBw,h,t,c,rWidth, height, thickness. Example: ^GB700,3,3
^XA
^PW600
^LL400
^FO30,30^GB400,240,3^FS
^FO30,110^GB400,3,3^FS
^FO50,55^A0N,30,30^FDLOT: A17^FS
^XZEducational example; not a certified label or a physical print test. Sample text and codes stay the same in every language for comparison.
Expected result with ^GB
The frame is 400 × 240 dots with a 3-dot border. A second ^GB draws the horizontal divider. Change only the frame thickness to 6 to distinguish outer dimensions from stroke thickness.
What should I check if ^GB does not give the expected result?
A frame does not contain or automatically clip text: each field keeps its coordinates. A large thickness can fill the box and cover content; it is not a substitute for width or height.
Related commands
About the author
Eduard Diaz
Eduard Diaz is an IT technician (development) at S-IE, an official Zebra partner with more than 20 years providing identification and labelling services. He builds and maintains EditorZPL to make working with ZPL and Zebra label printers easier.
s-ie.cat