Perspective Printing on network printer

Hi, i have a zebra barcode printer on network and we intend to print barcodes from our perspective application. I tried creating a gateway event script message handler and use this, but not printing. Can anyone help?

import socket
HOST = ‘10.200.132.41’
PORT = 9100
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
s.sendall(’^XA’)
s.sendall(’^FO50,50^ADN,36,20^FDHello world’)
s.sendall(’^FS’)
s.sendall(’^XZ’)
s.close()

1 Like