Send ZPL command to Zebra 170PAX4 via TCP/IP Socket

Sorry for the Delay been busy, changing the script to utilize the Java socket work and now I’m able to print without issues.
Bellow if a snip of the code if anyone needs it.

strMessage = “^XA^LH10,10^LRY^F010,45^AFN,20,20^FDHELLO^FS^XZ”
#========================================================================================

Send Data to Printer

#========================================================================================
port=9100
try:
# Open Socket Connection
clientSocket=Socket(strIP,port)
#Open data output stream
outToPrinter=DataOutputStream(clientSocket.getOutputStream())
#Send Data to Printer
outToPrinter.write(strMessage)
#close data stream and socket
outToPrinter.close();
clientSocket.close();
except IOError:
print “Error”

1 Like