Send printer commands using a socket connection

Is the TCPSocket-Component suitable to send printer commands (ZPL2-language for label printers) to the IP-Address of the printer?
Where can I find a sample or documentation how to do this?

It should work for that. There examples in the folder where you installed Xojo.