收据打印机 - 从网页打印

use*_*378 1 html printing firefox network-printers

我有一张收据打印机,它连接到我的计算机上的串行COM1.

我正在尝试从网页打印收据,当它打印时...它只是一个没有任何文字的空白.(空白收据!).它在IE8上工作正常,但不适用于Firefox 3.6

我有一台Epson TM-T88II打印机,并在Windows 7上使用"Generic/Text"驱动程序.

这是什么解决方案?

HTML收据代码:

<html>
<head>
    <title></title>
</head>
<body>
    <div>
        <div>Company Name</div>
        <div>Customer Name</div>
        <div>Order No</div>
        <div>1 x Item</div>
        <div>1 x Item</div>
        <div>1 x Item</div>
        <div>12.00</div>
    </div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

http://jsfiddle.net/bu49K/

小智 5

如果您愿意加载Java小程序,jzebra可以使用Generic Text驱动程序直接打印到Epsom TM系列热敏打印机到COM1端口,如您所述.

https://github.com/qzind/qz-print

您遇到的问题并不少见.Generic/Text绕过Epson打印驱动程序的PostScript(2D)功能.

如果使用Generic/Text,Epson使用ESC/P编程语言.您将在互联网上找到许多以这种格式打印的教程,jzebra在这里有关于这种"RAW"打印方式的更多信息:

https://github.com/qzind/qz-print/wiki/Raw-Printing

编辑:

要使其正常工作,只需将收据打印机设置为默认打印机并将其重命名为"zebra":

在此输入图像描述

然后只需下载qz-print库,将jar文件放在项目目录中,然后执行:

<input type=button onClick="print()" value="Print">
<applet id="qz" code="qz.PrintApplet.class" archive="./qz-print.jar" width="100" height="100">
      <param name="printer" value="zebra">
</applet>

<script>
      function print() {
       qz.append("PRINTED USING JZEBRA\n");
       qz.print();
      }
</script>
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述