通用的纯文本打印机驱动程序

通用的纯文本打印机驱动程序

本文介绍了通用的纯文本打印机驱动程序不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用通用纯文本打印机驱动程序,作为WDK(Windows驱动程序工具包)中的示例提供.但是它适用于某些应用程序,不适用于其他应用程序.就像它可用于记事本和Microsoft word,但不适用于chrome浏览器或 FloreantPOS 一样.我尝试使用此驱动程序通过以下4个应用程序打印到文件或热敏打印机:-

I am using Generic text-only printer driver, provided as a sample in WDK(Windows driver toolkit). But it works with some applications and doesn't work with others. Like it works with Notepad and Microsoft word, but doesn't work with chrome browser or FloreantPOS. I tried using this driver to print to a file or a thermal printer with following 4 applications:-

1)记事本上的简单文本:成功运行.

1)Simple text on Notepad: Works successfully.

2)Microsoft Word上的文本和图形(艺术字):成功运行,即打印文本并省略了图形

2)Text + graphics(word art) on Microsoft Word: Works successfully i.e. prints text and omits graphics

3)在Chrome浏览器上从google文档打印简单文本:不起作用,即在打印到文件的情况下文件为空,在打印到热敏打印机的情况下会出现空白页

3)Printing simple text from google docs on Chrome browser: Doesn't work i.e. in case of printing to a file, the file is empty and in case of printing to a thermal printer, I get a blank page

4)从 FloreantPOS 打印收据:与(3)相同.

4)Printing a receipt from FloreantPOS: Same as (3).

我想知道是否有人可以告诉我,chrome和 FloreantPOS 的工作方式有何不同?另外,我可以对通用纯文本驱动程序进行一些更改以使其与chrome和 FloreantPOS 一起使用吗?

I was wondering if somebody can tell me what chrome and FloreantPOS are doing differently? Also, can I make some changes into Generic text-only driver to make it work with chrome and and FloreantPOS ?

谢谢!

推荐答案

Chrome将文本打印为图形,或者至少在我尝试过的所有网站上打印.它使用线条画来绘制文本,而不是打印实际字符.因此,没有任何可打印的纯文本驱动程序.您可以通过打印到Adobe PDF然后打开生成的PDF并进行预检分析检查来证明这一点.我从cnn.com网站上打印了20页,并在PDF中得到了 no 文本.当我使用Windows纯文本打印机进行打印时,除了一堆换行符外,什么也没得到.

Chrome prints text as graphics, or at least on all the web sites I tried. It uses line drawing to draw the text rather than printing actual characters; therefore, there is nothing for a text-only driver to print. You can demonstrate this by printing to Adobe PDF and then opening the resulting PDF and inspecting it with preflight analysis. I printed 20 pages from a cnn.com web site and got no text in the PDF. When I print to the Windows text-only printer, I get nothing but a bunch of linefeed characters.

不幸的是,某些应用程序以这种方式打印.我在Firefox上得到相同的结果.(众所周知,浏览器 all 都不好打印.)在tumblr.com上使用Firefox(主要是纯文本),我得到了完整的垃圾信息.Firefox最有可能使用字形ID而不是字符进行打印,而纯文本驱动程序可能无法正确处理该字符.

Unfortunately, some applications print this way. I get the same results with Firefox. (Browsers are all notoriously bad at printing.) Using Firefox on tumblr.com, which is mostly plain text, I get complete garbage. Most likely, Firefox is printing using glyph IDs rather than characters, which the text-only driver probably doesn't handle correctly.

恐怕除了使用其他驱动程序之外,没有其他解决办法.纯文本驱动程序非常有限,我怀疑它是否可以在大多数应用程序中正常工作.我希望甚至Word都无法使用某些字体.我建议改用Unidriver Postscript或光栅驱动程序.

I'm afraid there is no fix for this other than using a different driver. A plain text driver is very limited and I doubt it will work well with most applications. I would expect even Word to fail with certain fonts. I would recommend using the Unidriver Postscript or raster driver instead.

这篇关于通用的纯文本打印机驱动程序不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 14:30