ZPL commands
^GB · Graphic Box
Draws a rectangle filled or as a border with a defined line thickness.
Draws a rectangle (filled or as a border) with a defined line thickness.
Parameters
^GBw,h,t,c,r- w: Width in dots (t to 32000, default = t)^GBw,h,t,c,r- h: Height in dots (t to 32000, default = t)^GBw,h,t,c,r- t: Line thickness in dots (1–32000, default 1)^GBw,h,t,c,r- c: Color (B = black, W = white; default B)^GBw,h,t,c,r- r: Corner rounding (0 = square to 8 = most rounded, default 0)
Example
^XA
^FO50,50^GB400,200,4,B^FS
^XZ
Tip
If the line thickness equals the height or width (e.g. ^GB400,60,60), you get a filled rectangle - ideal for black areas with ^FR text.