^LL - Label Length
Sets the label length, for continuous media.
^LL gives a printer the length of one label, in dot rows. It matters on continuous media
only — a roll with no gaps, notches or holes to detect. The printer has nothing to measure
there, and needs the boundary between one label and the next. On die-cut or gapped stock the
sensor knows already, and ^LL is redundant. The renderer ignores the command entirely.
The page size of the output comes from the dimensions in the API request, so ^LL changes
nothing about the result.
Syntax
^LLySupport
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 reads it, and the renderer ignores it, because Labelary ignores it too. The page size comes from the dimensions in the API request, not from the label. Regression snapshots pin this, so no one "fixes" it into a divergence. — pinned by test_ll_0_matches_no_ll, test_ll_2000_matches_no_ll, test_ll_600_matches_no_ll, test_ll_ignored_on_2x1_label, test_ll_longer_than_page_does_not_grow, test_ll_no_form_of_the_command_changes_the_page, test_ll_shorter_than_page_does_not_clip
Labelary renders this command.
Parameters
yLabel lengthoptional · dotsLength of the label in dots. On a printer this only applies to continuous media, selected with ^MNN.
- Default
- on a printer, the length set at the control panel or the printer's maximum label length
- Accepted range
- 1 to 32000 dots
- Invalid value
- enough to make the whole command be ignored. The parser reads and discards the value either way, so an invalid one changes nothing.
- Test coverage
- Bounds pinned: below the minimum (-100, 0), above the maximum (99999). No test at the minimum or maximum. The invalid-value rule is pinned by 1 test.
Behavior
The page size is a property of the request rather than of the format, so the renderer reads
^LL, checks its range and discards it. A format that carries ^LL1218 against a request for
a 4-by-2-inch label renders a 4-by-2-inch label, not a 6-inch-tall one. That is deliberate and
matches Labelary, and regression snapshots pin it so that no later change turns it into a
divergence. For a different page size, request one.
Nothing else in a format depends on ^LL here. The renderer never clips or wraps content at
the length it names, and a label whose fields run past the requested page height loses what
falls off the bottom.
On a printer the command is more delicate than its one argument suggests. To reach the label
under construction it must arrive before the first ^FS. Later, it applies to the next
label. The setting then persists until the printer switches off or another ^LL arrives, so it
is a mode change rather than a per-label instruction. The printer also accepts a length larger
than the installed memory holds. The guide states that the bottom of the label is cut off and
the content shifts down.
^ML is the companion setting. ^LL gives the length of a label, and ^ML gives how far the
printer can advance in search of the next gap.
Tested behavior
Differences from the specification
Labelary against the ZPL II guide
Where Labelary — our compatibility target — behaves differently from the printed specification.
- Labelary ignores
^LLentirely; the ZPL II guide has it set the label length. — not pinned by a test - Labelary's own reference documents a second argument, a
Y/Nflag for whether the length applies to all media, not to continuous media only. The 2006 guide'sFormatline has one argument. Neither Labelary nor the renderer acts on^LL, so the extra argument changes nothing here. — not pinned by a test
zpl.tools against the ZPL II guide
Where our renderer behaves differently from the specification.
- The renderer ignores
^LLto match Labelary. Set the page size through the API request instead. — not pinned by a test - A negative length uses its magnitude, and the report is the whole observable because neither engine acts on
^LL. The guide's range starts at 1. The report readsValue -100 is negative, but negative values are not allowed; used 100 instead. Labelary agrees, measured on 2026-08-21. — pinned bytest_ll_negative_length_reports_the_magnitude
Example
Rendered against a request for a 4-by-2-inch label, this returns a 4-by-2-inch label whatever the argument says:
^XA
^LL1218
^FO50,50^A0N,40,40^FDPage size comes from the request^FS
^FO50,110^A0N,40,40^FDnot from the format^FS
^XZ
Related commands
^MLMaximum Label LengthTells the printer how far to look for the next label gap.^PWPrint WidthSets the printable width of the label.^MNMedia TrackingThis command tells the printer whether the stock is continuous, or has a gap, web or black mark between labels.^LTLabel TopShifts every field up or down by a small number of dot rows.