Get status from a ZPL command

// Expert user has replied.
G Guilherme Astolphi 3 months 3 weeks ago
172 1 0

I'm sending some labels for printing via ZPL commands.

from zebra import Zebra
Zebra("S4M").output("""^XA~FDHello World^XZ""")  # print label

I checked in the zebra documentation that the ~HS command returns some status information, and this actually happens. I would like to know if it is possible to obtain this response using a PYTHON script. I verified that the win32api/win32print library and Zebra are not able to do this.

I tried to get the status through zpl commands by python.

Please Register or Login to post a reply

1 Replies

S Steven Si

The ~HS command returns the printer status string and can be used alone. The ~HS command should not be used between ^XA and ^XZ.

To send ZPL commands, including the ~HS command, we need to make a direct connection to the printer via TCP, Bluetooth, or USB. If the Python script can make such direct connection, it can certainly interact with the printer with ZPL commands.

CONTACT
Can’t find what you’re looking for?