What ^GB does
^GB draws rectangles, horizontal/vertical lines, and filled blocks. Set width, height, and border thickness in dots. A line is just a box with zero height (or width). Filled boxes are the basis for reverse-print callouts with ^FR.
Syntax
^GBw,h,t,c,rParameters
| Parameter | Description | Values | Default |
|---|---|---|---|
w | Box width, dots | — | — |
h | Box height, dots | — | — |
t | Border thickness, dots | — | 1 |
c | Line colour | B, W | B |
r | Corner rounding | 0–8 | 0 |
Example
^XA
^FO50,50^GB500,3,3^FS
^FO50,80^GB200,100,4^FS
^XZFirst ^GB is a horizontal line; second is a bordered box.
Paste this into the free ZPL viewer to see it render, or convert it to PDF.
Related commands
See the full ZPL command reference for all 92 documented commands.
