Hi,
We did a project in 2015 where we were printing data to Toshiba and Zebra Label Printers and with there *.prn files it was a lot easy
Herein attached is the code for the same
Dim ToshibaStr As String = "{D0281,0301,0251|}" &
"{AY;+05,0|}" &
"{C|}" &
"{PC000;0023,0056,05,1,J,00,B=EN: " & RFID & "|}" &
"{PC001;0025,0093,05,1,J,00,B=LV: " & LeakValueASCII & "|}" &
"{PC002;0057,0137,1,1,J,00,B=STS: OK|}" &
"{PC003;0024,0175,05,05,I,00,B=" & DateAndTime.DateString & "|}" &
"{PC004;0023,0202,05,05,I,00,B=" & DateAndTime.TimeOfDay & "|}" &
"{PC005;0025,0231,05,05,I,00,B=" & shift & "|}" &
"{XB00;0168,0155,T,L,04,A,0,M2=" & RFID & ">M" & LeakValueASCII & "|}" &
"{XS;I,0002,0002C4201|}"
Dim ip As String = Lip
Dim port As Integer = CInt(LPort)
Try
'Open Connection
Dim client As New System.Net.Sockets.TcpClient
client.Connect(ip, port)
'Write ZPL String to Connection
Dim writer As New System.IO.StreamWriter(client.GetStream())
writer.Write(ToshibaStr)
writer.Flush()
'Close Connection
writer.Close()
client.Close()
This will work with raw ethernet without installing drivers..
The port was "9100"
Hope this helps....