Windows 移动设备 - Zebra 打印机 mz220
我正在通过蓝牙从 Windows Mobile 6 设备打印到 Zebra 打印机 mz220。印刷在某种程度上效果很好。此后,打印机暂停,然后添加新行,然后继续打印。这远非理想,因为在打印不应有新行的行的过程中可能会发生暂停和新行。
我在 .net 中使用 SerialPort 类,并且添加了 thread.sleep(1000) 以便有时间打印所有应该打印的数据。这解决了之前的一个问题,即长收据上的某些数据未打印。
using (var serialPort = new SerialPort())
{
serialPort.PortName = this.PortName;
serialPort.Open();
Thread.Sleep(2500);
serialPort.Write(text);
}
任何想法为什么会发生这种情况以及如何解决这个问题。
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否以行模式打印,或者这是 CPCL 格式?您使用的是连续介质还是标签/间隙介质?您的打印机可能配置错误,认为它正在打印标签(介质上有间隙)并跳过它认为有间隙的位置。查看:
SGD,如果您使用收据纸而不是标签,则应将其设置为日记帐。
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:
SGD, it should be set to journal if you are using receipt paper and not labels.
事实证明,我所需要做的就是安装 Zebra 打印机 SDK 并根据 SDK 中提供的串行端口类重写代码。
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.