^JM Set Dots per Millimeter

Label geometry and units ZPL caret command

Selects between the printer's normal dot density and half of it. At the lower density the format is doubled in size, and field origins are affected.

Format ^JMn

^JM parameters

Parameters of ^JM
ParameterMeaningAccepted valuesDefault
nset dots per millimeterp. 269

Which density mode the format uses: the normal density of the printhead, or half of it.

  • A24 dots/mm, 12 dots/mm, 8 dots/mm or 6 dots/mm (the normal density of the printhead)
  • B12 dots/mm, 6 dots/mm, 4 dots/mm or 3 dots/mm (half the normal density)
A

^JM notes and gotchas

  • Gotcha

    ^JM must be entered before the first ^FS in a format, and its effects are persistent. The guide does not say how long they persist, for example across a power cycle.

    p. 269
  • Gotcha

    With ^JMB, the UPS MaxiCode barcode becomes out of specification.

    p. 269
  • Interaction

    The guide says ^JM also affects where ^FO places a field on the label, and refers to its example for the effect. It does not give a rule for how the position changes.

    pp. 201, 269
  • Note

    The guide describes ^JM as lowering the print density: 24 dots/mm becomes 12, 12 becomes 6, 8 becomes 4 and 6 becomes 3. It also says the command doubles the format size of the label.

    p. 269
  • Note

    The guide's example sends the same barcode data first with ^JMA and then with ^JMB, to show the effect of switching between the two modes.

    p. 269
  • Note

    ^MU also converts between densities, using its base and conversion parameters. The ^MU entry names 600 dpi printers as able to print at 300, 200 and 150 dpi and 300 dpi printers as able to print at 150 dpi.

    p. 312
  • Guide issue

    The ^JM entry pairs 12 dots/mm with 304 dots per inch and 6 dots/mm with 153, and its paragraph on normal capabilities leaves out 24 dots/mm, which its first paragraph and parameter table include. The summary in the advanced-techniques chapter gives 609.6, 304.8, 203.2 and 152.4 dots per inch for 24, 12, 8 and 6 dots/mm and 102 and 77 for 4 and 3. The ^GB entry gives 300 dots per inch for 12 dots/mm and 600 for 24, and the ^LH entry gives 152 for 6. Dots per millimeter is used here as printed.

    pp. 210, 269, 293, 1757

^JM example

example.zplZPL
^XA
^JMB
^FO100,100^A0N,30,30^FDHalf density^FS
^XZ

^JMB selects the lower density mode, and comes before the first ^FS as the guide requires. The one text field follows it; the guide says that in this mode the format is doubled in size and field origin placement is affected.

Guides that use ^JM

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, 269, 293, 312, 1757.

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.