Skip to command documentation
Supportedgraphicrasterfield scope
^GD

Graphic Diagonal Line

^GD configures graphic Diagonal Line. It applies to the current field and can change pixels in the rendered label.

Syntax
^GDw,h,t,c,o
w

Box width (in dots)

Sets box width (in dots). It can be omitted when the documented default is suitable.

Default
value of t (thickness) or 3
Range
3–32000
Required
No
Documented values332000

w variations

Compare values side by side; other parameters remain at representative defaults.

Side-by-side comparison3 variations

w = 160

Uses 160 for box width (in dots) while the other command values stay at representative defaults.

ZPLcaret-gd-w-1.zpl
^XA
^PW640
^LL360
^FO90,55
^GD160,140,6,B,R^FS
^FO28,318^A0N,22,22^FDCaret GD parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser

w = 280

Uses 280 for box width (in dots) while the other command values stay at representative defaults.

ZPLcaret-gd-w-2.zpl
^XA
^PW640
^LL360
^FO90,55
^GD280,140,6,B,R^FS
^FO28,318^A0N,22,22^FDCaret GD parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser

w = 420

Uses 420 for box width (in dots) while the other command values stay at representative defaults.

ZPLcaret-gd-w-3.zpl
^XA
^PW640
^LL360
^FO90,55
^GD420,140,6,B,R^FS
^FO28,318^A0N,22,22^FDCaret GD parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser
h

Box height (in dots)

Sets box height (in dots). It can be omitted when the documented default is suitable.

Default
value of t (thickness) or 3
Range
3–32000
Required
No
Documented values332000

h variations

Compare values side by side; other parameters remain at representative defaults.

Side-by-side comparison3 variations

h = 70

Uses 70 for box height (in dots) while the other command values stay at representative defaults.

ZPLcaret-gd-h-1.zpl
^XA
^PW640
^LL360
^FO90,55
^GD340,70,6,B,R^FS
^FO28,318^A0N,22,22^FDCaret GD parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser

h = 120

Uses 120 for box height (in dots) while the other command values stay at representative defaults.

ZPLcaret-gd-h-2.zpl
^XA
^PW640
^LL360
^FO90,55
^GD340,120,6,B,R^FS
^FO28,318^A0N,22,22^FDCaret GD parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser

h = 190

Uses 190 for box height (in dots) while the other command values stay at representative defaults.

ZPLcaret-gd-h-3.zpl
^XA
^PW640
^LL360
^FO90,55
^GD340,190,6,B,R^FS
^FO28,318^A0N,22,22^FDCaret GD parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser
t

Border thickness (in dots)

Sets border thickness (in dots). It can be omitted when the documented default is suitable.

Default
1
Range
1–32000
Required
No
Documented values132000

t variations

Compare values side by side; other parameters remain at representative defaults.

Side-by-side comparison3 variations

t = 2

Uses 2 for border thickness (in dots) while the other command values stay at representative defaults.

ZPLcaret-gd-t-1.zpl
^XA
^PW640
^LL360
^FO90,55
^GD340,140,2,B,R^FS
^FO28,318^A0N,22,22^FDCaret GD parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser

t = 6

Uses 6 for border thickness (in dots) while the other command values stay at representative defaults.

ZPLcaret-gd-t-2.zpl
^XA
^PW640
^LL360
^FO90,55
^GD340,140,6,B,R^FS
^FO28,318^A0N,22,22^FDCaret GD parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser

t = 12

Uses 12 for border thickness (in dots) while the other command values stay at representative defaults.

ZPLcaret-gd-t-3.zpl
^XA
^PW640
^LL360
^FO90,55
^GD340,140,12,B,R^FS
^FO28,318^A0N,22,22^FDCaret GD parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser
c

Line color

Sets line color. It can be omitted when the documented default is suitable.

Default
B
Required
No
Documented valuesBW

c variations

Compare values side by side; other parameters remain at representative defaults.

Side-by-side comparison2 variations

c = B

Uses B for line color while the other command values stay at representative defaults.

ZPLcaret-gd-c-1.zpl
^XA
^PW640
^LL360
^FO90,55
^GD340,140,6,B,R^FS
^FO28,318^A0N,22,22^FDCaret GD parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser

c = W

Uses W for line color while the other command values stay at representative defaults.

ZPLcaret-gd-c-2.zpl
^XA
^PW640
^LL360
^FO90,55
^GD340,140,6,W,R^FS
^FO28,318^A0N,22,22^FDCaret GD parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser
o

Orientation (direction of the diagonal)

Sets orientation (direction of the diagonal). It can be omitted when the documented default is suitable.

Default
R
Required
No
Documented valuesR

o variations

Compare values side by side; other parameters remain at representative defaults.

Side-by-side comparison2 variations

o = R

Uses R for orientation (direction of the diagonal) while the other command values stay at representative defaults.

ZPLcaret-gd-o-1.zpl
^XA
^PW640
^LL360
^FO90,55
^GD340,140,6,B,R^FS
^FO28,318^A0N,22,22^FDCaret GD parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser

o = X

Uses X for orientation (direction of the diagonal) while the other command values stay at representative defaults.

ZPLcaret-gd-o-2.zpl
^XA
^PW640
^LL360
^FO90,55
^GD340,140,6,B,X^FS
^FO28,318^A0N,22,22^FDCaret GD parameter example^FS
^XZ
Renderer8 dpmm
Preview loads in your browser

Primary source

Official Zebra reference

Use the manufacturer reference for printer- and firmware-specific behavior beyond ZPLr’s pinned rendering profile.

Open Zebra documentation

ZPLr Command Reference

Independent documentation for the pinned ZPL II 2025 renderer profile. Examples run locally in your browser.

ZPL, ZPL II, Zebra, and Zebra Programming Language are trademarks or registered trademarks of Zebra Technologies Corp. ZPLr is independent and is not affiliated with or endorsed by Zebra Technologies Corp.