^HF - Host Format
Sends a stored format back to the host.
^HF asks the printer to send a stored format back over the link it arrived on, as
ZPL text. It is the counterpart to ^DF:
one command writes a template into printer memory, and this one reads it out again. The
reply shows what a printer holds rather than what the host believes it sent. The command
prints nothing, so the renderer has nothing to draw.
Syntax
^HFd:o.xSupport
Accepted and skipped, because it configures the printer rather than the label. It cannot change the rendered output, and Labelary skips it too.
Returns data over the printer's link rather than changes the label. Both engines ignore it. — not pinned by a test
Labelary renders this command.
Parameters
dStorage deviceoptional · single characterWhich memory device to read from.
- Default
- R:
- Invalid value
- discarded, and the default applies
- Test coverage
- The invalid-value rule is not pinned by a test.
oFormat nameoptional · textName of the format to send. One to eight alphanumeric characters.
- Default
- UNKNOWN
- Invalid value
- discarded, and the default applies
- Test coverage
- The invalid-value rule is not pinned by a test.
xExtensionoptional · one of a setObject extension. Always .ZPL for a format.
- Default
- .ZPL
- Invalid value
- discarded, and the default applies
- Test coverage
- No documented value is exercised by a test (.ZPL). The invalid-value rule is not pinned by a test.
.ZPL- The only extension a stored format can have (default)
Behavior
The reply goes to the host, not to the label, and only a listener can read it: a terminal emulator or an open bidirectional connection. A one-way print queue loses the command.
The reply holds the stored ZPL in a rebracketed form rather than verbatim. For a
template downloaded as ^XA^DFB:FILE1.ZPL … ^XZ, the guide's own example shows the
printer returns ^XA^DFFILE1,, then the stored body, then ^XZ. The device prefix and
the extension are gone from the ^DF line, and a comma is there instead. Parse the
reply rather than diff it against the request.
The guide holds one inconsistency. Its Format line for this command writes the
arguments comma-separated, as ^HFd,o,x, and the example on the same page and
Labelary's reference both use the ordinary object path, ^HFR:FILE.ZPL. The object path
is the form to write.
The command cannot change the image, so the renderer ignores it and continues with the
rest of the format. 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.
Example
Requesting a format alongside an ordinary label. The page renders exactly as it would without the ^HF.
^XA
^HFR:SHIPTO.ZPL
^FO50,50^A0N,40,40^FDPrints as usual^FS
^XZ
Related commands
^DFDownload FormatStores the rest of the label as a reusable format instead of printing it.^XFRecall FormatRecalls a stored format and merges the current label's data into it.^HGHost GraphicUploads a stored graphic back to the host.^HWHost Directory ListSends a listing of the objects held in printer memory back to the host.