简体   繁体   中英

Windows mobile - Zebra Printer mz220

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

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"

事实证明,我要做的就是安装Zebra打印机SDK,并针对SDK中提供的串行端口类重新编写代码。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM