zpl.tools
Media and sensors

^MM - Print Mode

Selects what happens to a label after it is printed: tear-off, peel-off, rewind, cut or applicator.

^MM decides what the printer does with a label once the image is on it. The hardware decides which values a printer accepts, so a mode a format asks for can be absent on the machine that receives it.

Syntax

^MMa,b

Support

Recognised, deliberately skippedparsed: full · state: none · rendered: none

Accepted and skipped, because it configures the printer rather than the label. It cannot change the rendered output, and Labelary skips it too.

The parser stores this command as MmCommand, and nothing reads it. Every mode describes where the media goes after the print, so the image is the same in all modes. The parser reads it, so the renderer reports no unsupported-command warning, unlike the unparsed media commands below. — not pinned by a test

Labelary renders this command.

Parameters

aPrint modeoptional · one of a setnot honoured by zpl.tools

The post-print action. A printer tears, peels, rewinds or cuts the label, or hands it to an applicator.

Default
T
Invalid value
not possible — any value is accepted. The parser stores this argument as a free string, unchecked against the eight letters. Nothing reads it.
Test coverage
No documented value is exercised by a test (T, P, R, A, C, D, F, K).
T
Advance the label to the tear-off bar for manual tear-off (default)
P
Advance the label and wait for manual peel-off
R
Rewind the label on an external rewind device
A
Advance the label for an applicator device
C
Advance the label for automated cutting
D
Wait for a delayed cut command
F
Encode RFID data without backfeeding
K
Present the label for removal from a kiosk
bPre-peeloptional · Y or Nnot honoured by zpl.tools

Whether the printer peels the liner away before the print or after it.

Default
N
Invalid value
not possible — any value is accepted. The parser stores this argument as a free string, and accepts any character except Y or N.
Test coverage
No documented value is exercised by a test (Y, N).
Y
Pre-peel each label
N
Do not pre-peel (default)

Behavior

The mode governs the whole print job, not a single label: it applies after each label, or after a group when ^PQ asks for several.

The mode decides whether two other commands have anything to do. Tear-off and peel-off both backfeed, print, then feed the label out to rest, so ~JS tunes that backfeed and ^XB suppresses it. In cutter mode ^XB suppresses the cut as well, to avoid a jam. Rewind mode never backfeeds, because the next label already sits at the print line, so neither command changes anything there.

Delayed cutter mode needs a second command to finish the job: the guide has the printer hold the cut label until ~JK arrives. Treat that as guide-only knowledge. ~JK has no page in the guide, and appears in neither the guide's command index nor Labelary's command table. The renderer therefore treats it as bytes that are not ZPL rather than an ignored command.

On a printer, a missing or unrecognized argument leaves the current mode unchanged rather than resets it to tear-off. The renderer validates neither argument: it parses both into the syntax tree as free strings and never reads them again, so it accepts ^MMZ as quietly as ^MMT.

Pre-peel is the one mechanical detail the value list cannot convey. With pre-peel on, the printer feeds the next label forward far enough to lift its leading edge off the liner, backfeeds, and only then prints. It makes peel-off work on stock whose adhesive resists separation.

Differences from the specification

Labelary against the ZPL II guide

Where Labelary — our compatibility target — behaves differently from the printed specification.

  • The guide (45541L-004, page 226) lists six modes: T, P, R, A, C and D. Labelary adds F, to encode RFID data without backfeed, and K, to present the label for removal from a kiosk. The 2006 edition documents neither. — not pinned by a test
  • The guide gives the pre-peel default as Y. Labelary documents N. This page lists N, because Labelary is the compatibility target. — not pinned by a test

zpl.tools against the ZPL II guide

Where our renderer behaves differently from the specification.

  • The parser puts both arguments into MmCommand, validates neither, and nothing reads them. — not pinned by a test

Example

Cutter mode, with pre-peel off, ahead of the label it applies to.

^XA
^MMC,N
^FO50,50^A0N,40,40^FDCut after printing^FS
^XZ

Open in viewer

  • ^MF Media FeedThis command sets what the printer does with the media at power-up and when the printhead closes.
  • ^CP Remove LabelThis command ejects or retracts a printed label from the presenter.
  • ^CN Cut NowThis command operates the cutter immediately on a kiosk printer.
  • ~JS Change Backfeed SequenceThis command sets how far the printer pulls the media back, and whether before or after the print.
  • ~TA Tear-Off Adjust PositionThis command moves where the media stops relative to the tear-off bar.