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.
1 Replies
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.