Problem
Is there a simple ZPL code or a way to get an error message from a Zebra printer to determine if these labels were not printed successfully or that there was some kind of error?
Progress
Here is a nice feature that I created to send a printer job to a zebra printer:
public static void SendToPrinter(string zplString, string ipAddress = "127.0.0.1", int port = 1337)
{
TcpClient tcpClient = new TcpClient();
tcpClient.Connect(ipAddress, port);
using (System.IO.StreamWriter writer = new System.IO.StreamWriter(tcpClient.GetStream()))
{
writer.Write(zplString);
writer.Flush();
writer.Close();
}
tcpClient.Close();
}
ZplString has a lot of magic, but it’s mostly ZPL code that we all love. The problem with my approach is that it seems to be more like a one-way printer ticket. A lot of work went into the above, and I hope that we can somehow change it to listen to the answer, if I somehow had the appropriate ZPL code to listen to the answer?
, - , , ?
, , ZPL, # .NET, - . , , " ?". , , , ZPL?
, .