Skip to content

Use ZPL Output


ZPL (Zebra Programming Language) is a printer control language supported by label printers. The seal-zpl-checkout service checks the printer status before and after data transmission. It delays data transmission until all previous jobs are printed and the printer is idle. This avoids overloading the printer. After data transmission, the service waits until the current print job is complete. Once the print job is complete, the socket connection is closed immediately without a socket shutdown or a close timeout.

Hint - remote sites

The ZPL output for ZPL printers at remote sites is implemented in the seal-island-checkout service. For more information regarding on how to setup remote site printing, refer to Remote Printing.


Restrictions

Consider the following restrictions concerning the ZPL output:

  • It only works if the printer supports the ZPL host status query, ~HS.
  • The printer is considered idle only if no formats are queued, the printer is not paused, no paper is out, the buffer is not full, the printhead is down, ribbon is present, and no temperature error is reported.
  • While waiting for the printer to become idle before sending a job, a premature close of the socket connection is treated as a failure, and the print job is set to error status.
  • While waiting for the current print job to complete after sending it, a premature close of the socket connection is treated as a normal completion, not as an error.
  • If the printer does not report idle within the time specified by checkTimeout, the check is aborted, and the print job is set to error status.

Configuration

For a printer using ZPL output, the connection printer key has to be specified as

"connection": "zpl://<printer>:9100"

Available options for the ZPL output:

  • checkInterval specifies the human readable interval for polling until the printer is idle.
  • checkTimeout specifies the human readable timeout until polling is canceled.

Example - printer connection with zpl

connection: zpl://myprinter:9100?checkInterval=1s&checkTimeout=4h


Service Keys

The following service keys are available for the seal-zpl-checkout service:

Each of the checkInterval and checkTimeout service keys can be overridden per printer via the matching connection option, refer to Configuration above.


Back to top