Domanda

I am printing to a Zebra printer mz220 via bluetooth from a windows mobile 6 device. The printing works fine to a point. After this point the printer pauses and then adds a new line before continuing with it's printing. This is far from ideal as the pause and new line can happen part way through printing a line that should not have a new line.

I am using the SerialPort class in .net and I have added a thread.sleep(1000) to allow time for all the data that should be printed to get printed. This fixed an earlier problem where some of the data on long receipts was not being printed.

                using (var serialPort = new SerialPort())
            {
                serialPort.PortName = this.PortName;
                serialPort.Open();
                Thread.Sleep(2500);

                serialPort.Write(text);
            }

Any ideas why this might be happening and how to go about solving this issue.

Thanks

È stato utile?

Soluzione 2

Turns out that all I needed to do was to install the Zebra printer SDK and re-write the code against the serial port class provided as part of the SDK.

Altri suggerimenti

Are you printing in line mode, or is this a CPCL format? Are you using continuous media, or label/gap media? Your printer could be incorrectly configured to think it is printing a label (which has gaps in the media) and is skipping over where it thinks the gap is. Look at the:

! U1 getvar "media.type" 

SGD, it should be set to journal if you are using receipt paper and not labels.

! U1 setvar "media.type" "journal"
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top