Windows 移动设备 - Zebra 打印机 mz220

发布于 2024-12-11 16:33:55 字数 548 浏览 0 评论 0原文

我正在通过蓝牙从 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

初相遇 2024-12-18 16:33:55

您是否以行模式打印,或者这是 CPCL 格式?您使用的是连续介质还是标签/间隙介质?您的打印机可能配置错误,认为它正在打印标签(介质上有间隙)并跳过它认为有间隙的位置。查看:

! U1 getvar "media.type" 

SGD,如果您使用收据纸而不是标签,则应将其设置为日记帐。

! U1 setvar "media.type" "journal"

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"
时光匆匆的小流年 2024-12-18 16:33:55

事实证明,我所需要做的就是安装 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文