admin管理员组

文章数量:1618192

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