^PW Print Width

Label geometry and units ZPL caret command

Sets the print width of the label in dots.

Format ^PWa

^PW parameters

Parameters of ^PW
ParameterMeaningAccepted valuesDefault
alabel width (in dots)p. 329

The width of the label, counted in dots.

A value larger than the label width is reduced to the label's maximum size.

2 up to the width of the label.

The last permanently saved value.

^PW notes and gotchas

  • Firmware

    The command is ignored on the HC100 printer.

    Firmware: Ignored on the HC100 printer. p. 329
  • Note

    The entry does not state a maximum number: the upper limit is the label width itself. It also does not say where in a format the command has to appear.

    p. 329
  • Note

    The entry never mentions the printhead and limits the value to the label's maximum size. The guide also lists a Set-Get-Do printer setting, ezpl.print_width (page 820): set with setvar to any printhead width, default the printhead width, read with getvar. That is a printer setting, not a ZPL command, and the guide does not say how it relates to ^PW.

    pp. 329, 820
  • Note

    The default is the last permanently saved value. The ^JU entry says ^JUS saves the current settings for use at power-on (page 278), and the ^LL entry says its own setting is lost at power-off unless ^JUS is received (page 294). The ^PW entry does not say whether ^JUS stores a width set with ^PW.

    pp. 278, 294, 329
  • Note

    The entry gives no conversion between dots and millimeters or inches. The ^GB entry (page 210) and the ^LH entry (page 293) list dots per millimeter for the printhead types, with figures that differ slightly between the two pages.

    pp. 210, 293
  • Note

    Not stated by the guide: whether ^MU units apply to a. The ^MU entry says it sets the units of measurement field by field (page 312), and the ^PW parameter is labeled in dots (page 329).

    pp. 312, 329

^PW example

example.zplZPL
^XA
^PW800
^FO30,25^A0N,36,36^FDWidth test^FS
^XZ

Sets the print width to 800 dots, then places one line of text. If 800 is larger than the label, the guide says the width becomes the label's maximum size.

Guides that use ^PW

BarcoderX is a .NET SDK for thermal labels and barcodes. See how it prints and exports labels.

Source Zebra, ZPL II, ZBI 2, Set-Get-Do, Mirror, WML Programming Guide, P1134473-11EN Rev A, 2026/07/05, pages 60, 190, 201, 204, 210, 278, 293, 294, 312, 329, 820.

Written by BarcoderX in its own words. Checked against the guide on 2026-11-14.

ZPL and ZPL II are trademarks of Zebra Technologies Corporation. This reference is written by BarcoderX in its own words from Zebra's published programming guide. BarcoderX is an independent product and is not affiliated with, endorsed by or sponsored by Zebra Technologies.