^PW
Print WidthPreview: exactSets the printable width in dots. Anything to the right of it is clipped, which is the usual cause of labels cut off on one side.
Syntax
^PWaParameters
| Parameter | Description and accepted values | If omitted |
|---|---|---|
| a | Printable width in dots. The printer clamps it to the physical printhead width.2 to the printhead width, in dots | Last ^PW value |
How it works
^PW sets how many dots wide the printable area is. The printer clips every field at that boundary, so a value smaller than your media silently truncates the right-hand side of the label.
The value is in dots, not millimetres, so it depends on the printhead resolution. A 4-inch label is 812 dots at 203 dpi, 1200 dots at 300 dpi and 2400 dots at 600 dpi. Copying a ^PW from a 203 dpi template into a 300 dpi printer is why a label suddenly prints at two-thirds width.
^PW belongs near the top of the format, before any field. It stays in effect for subsequent labels until it is changed or the printer is reset.
Example
^XA
^PW480
^LL240
^FO40,40^GB400,160,3^FS
^FO70,100^A0N,40,40^FD480 x 240^FS
^XZRendering…
How the preview on this site handles it
Fully supported. In the viewer, ^PW and ^LL override the label size chosen in the interface, so the preview matches what the format itself declares.
Common mistakes
- Reusing a ^PW value across resolutions. Dots are not millimetres — recalculate for 203, 300 or 600 dpi.
- Setting ^PW wider than the printhead. The printer clamps it, and fields you expected on the right never appear.
- Placing ^PW after the fields it should affect. Put it right after ^XA.