WPF C# 应用程序中 POS 打印机的最佳字体
我根据客户要求用 WPF 和 C# 开发了一个应用程序。现在我在票据打印方面遇到问题。打印机是WEP DR-400系列,我使用“FlowDocument”来预览账单和打印。现在我的客户希望解决这些问题;
- 打印速度比以前基于 Foxpro 的应用程序慢
- 账单上打印的数字会造成混乱,例如 8,9 和 6 看起来完全相同。
我不知道如何解决这些问题,对于 2. 在客户请求后,我在 FlowDocument 中拥有 12 字体大小的“MS Gothic”和 13 字体大小的“Segoe”。我的字体选择受到页面宽度的限制(我需要打印 5 列,其中项目名称应显示在一行中)。
任何帮助将不胜感激!
I have developed an application in WPF and C# as client requirement. Now I am facing problem in bill printing. Printer is WEP DR-400 series and I am using "FlowDocument" to preview bill and printing. Now my client wants these issue to solve;
- Printing is slow than previous Foxpro based app
- Numbers printed on bill creates confusion like 8,9 and 6 appears quite same.
I don't know how to solve these problems, for 2. i have "MS Gothic" with 12 then "Segoe" with 13 font size in FlowDocument after client request. My font selection is constrained by page width (i need to print 5 cols with Item Name which should be displayed in one line).
Any help would be appreciated!!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
POS 打印机几乎完全以其本机点阵模式使用。您可以绕过打印机驱动程序,将要打印的字符串直接发送到打印机。您将获得的字体是内置于打印机固件中的字体。通常为等间距并经过优化,可与典型 POS 打印机的相当有限的输出功能很好地配合。您需要的代码位于此知识库文章中。
当您使用打印机驱动程序时,打印机会被驱动程序切换到图形模式。这使得它们非常慢。
POS printers are almost exclusively used in their native dot-matrix mode. You send the strings to print directly to the printer, bypassing the printer driver. The font you'll get is the one that's baked into the printer's firmware. Typically mono-spaced and optimized to work well with the rather restricted output capabilities of a typical POS printer. The code you need is in this KB article.
When you use the printer driver, the printer is switched into graphics mode by the driver. That makes them very slow.
在字体方面,Georgia 擅长区分小磅值的数字。 (尽管在 13 点处,任何字体都不会有问题。)
作为一种完全解释型语言,FoxPro 的速度并不是非常快,尽管运行时内存占用量较低。您的客户可以从更多内存中受益吗?
With regard fonts, Georgia is good in distinguishing digits at small point sizes. (Although at 13 points, you shouldn't get a problem with any font.)
As a fully interpreted language, FoxPro is not terribly quick although runtime has a low memory footprint. Could your client benefit from more memory?