^MD - Media Darkness
Adjusts print darkness up or down from the level `~SD` set.
^MD moves the printhead heat up or down from the printer's configured level.
It lets a format compensate for media that burns lighter or darker than the
batch behind that level. The number is an adjustment, not a darkness. ^MD10
means ten more than the configured setting, and the configuration label prints
that setting.
Syntax
^MDaSupport
Accepted and skipped, because it configures the printer rather than the label. It cannot change the rendered output, and Labelary skips it too.
Darkness controls how much heat the printhead applies. The output of the renderer is pure black and white. There is no darkness to change. The renderer does not parse this command. It reports IGNORED_COMMAND at info severity, which does not reach X-Warnings. Labelary is also silent, so the rendered label is identical in both engines. — not pinned by a test
Labelary renders this command.
Parameters
aDarkness adjustmentrequired · integerHow much to lighten or darken the print. Negative values are lighter.
- Accepted range
- -30 to 30
- Invalid value
- enough to make the whole command be ignored. The guide says that the printer ignores the command when no value is entered. There is no per-command default. The initial value at power-up is 0. The current setting and the ±30 limit both bound the accepted range. A value that pushes the total past 30 raises the total only to 30.
- Test coverage
- No test at the minimum, maximum or one step outside the range. The invalid-value rule is not pinned by a test.
Behavior
Adjustments do not accumulate. Each ^MD counts against the configured value,
not against the previous ^MD. The guide's example starts from 15: an ^MD-6
gives 9, and an ^MD2 after it gives 17, not 11. Two commands in one format
therefore act as one, and the last one wins.
The printer clamps the result rather than rejects it. From a configured 25,
^MD10 reaches 30 and stops.
~SD sets the level this command adjusts, and the guide adds the two together.
Set the base with ~SD, and use ^MD only for the per-media correction.
None of this survives into a render, because the output is pure black and white.
The renderer does not parse this command. It reports IGNORED_COMMAND at info
severity, which does not reach X-Warnings. Labelary is also silent, so the
rendered label is identical in both engines.
Differences from the specification
Labelary against the ZPL II guide
Where Labelary — our compatibility target — behaves differently from the printed specification.
- Labelary documents this as a whole number. The guide's own examples pass tenths, such as
^MD8.3, because the XiIIIPlus takes darkness in increments of 0.1. — not pinned by a test
Example
Base darkness set to 15, then adjusted up by 10 for this format:
~SD15
^XA
^MD10
^FO50,50^A0N,40,40^FDDarker^FS
^XZ
Related commands
~SDSet DarknessSets the base print darkness level.^PRPrint RateSets the speed of the media during print, slew and backfeed.