Question

Device: MC 9090
OS: Windows Mobile 5
Printer: QL 320 connected via serial port to MC 9090
I am sending ZPL to the serial port, but the printer prints ANSI characters only on the 3x2 label. No barcode or no text

Any help will be appreciated.

NOTE: I do not want to install special printer drivers.

Here is my code:

StringBuilder sb = new StringBuilder();
sb.AppendLine("^XA");
sb.AppendLine("^FO100,100^BY3");
sb.AppendLine("^BCN,100,Y,N,N");
sb.AppendLine("^FD123456^FS");
sb.AppendLine("^XZ");
string DataToPrint = sb.ToString();
SerialPort S = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One);
try
{
    S.Open();
    S.Write(DataToPrint);
    S.Close();
}
catch (Exception Ex)
{
    MessageBox.Show(Ex.Message);
}
Was it helpful?

Solution

Not sure what you mean by ANSI characters, but a few things to check are: If by serial connection you mean a physical (not a virtual ) serial connection, check the baud rate on printer and make sure the baud rate you specify in your SerialPort("COM1", 9600, ...) matches the printer baud rate. A delay, of about 500 milliseconds after Open() and also before Close() would be a good idea; this will ensure printer is ready to receive after Open, and it has processed your label before Close(). Also, since you are sending ZPL to the printer, check and make sure printer is setup to accept ZPL.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top