zpl.tools
Printer configuration

^KN - Define Printer Name

Sets the printer's network name and a free-text description of it.

^KN names the printer on the network and gives it a description, usually its location. The name appears on the configuration label and on the web page the printer serves, which is how an operator tells identical units apart.

Syntax

^KNa,b

Support

Recognised, deliberately skippedparsed: none · 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 command names the device for the network, which has no bearing on label content. 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

aPrinter nameoptional · text

Network name for the printer, up to 16 alphanumeric characters.

Default
the existing name, which an omitted value leaves alone
Invalid value
clamped to the nearest allowed value. The renderer does not parse or measure this command. The printer truncates a name longer than 16 alphanumeric characters to its first 16. An omitted value leaves the parameter alone.
Test coverage
The invalid-value rule is not pinned by a test.
bDescriptionoptional · text

Free-text description, such as the printer's location. Up to 35 alphanumeric characters.

Default
the existing description, which an omitted value leaves alone
Invalid value
clamped to the nearest allowed value. The renderer does not parse or measure this command. The printer truncates a description longer than 35 alphanumeric characters to its first 35. An omitted value leaves the parameter alone.
Test coverage
The invalid-value rule is not pinned by a test.

Behavior

Neither argument is a hard error. The guide states that an omitted value leaves that argument alone. It also states that the printer truncates a name over 16 characters, or a description over 35, to the limit rather than rejects it.

The name is printer identity, not label content, so the renderer ignores this command.

Example

A name and a description, both within their limits:

^XA
^KNCALLIOPE,DESK 42
^FO50,50^A0N,30,30^FDPrinter named^FS
^XZ

Open in viewer