public static void SendToPrinter(string zplString, string ipAddress = "127.0.0.1", int port = 1337)
{
// Open connection
TcpClient tcpClient = new TcpClient();
tcpClient.Connect(ipAddress, port);
// Write ZPL String to connection
using (System.IO.StreamWriter writer = new System.IO.StreamWriter(tcpClient.GetStream()))
{
writer.Write(zplString);
writer.Flush();
writer.Close();
}
// Close Connection
tcpClient.Close();
}
斑马打印机通过Tcp发送字符串实现打印
最新推荐文章于 2024-04-19 17:11:54 发布