How to print a receipt through Receipt Printer from Web Page(.aspx)?

心不动则不痛 提交于 2019-11-27 11:01:42

问题


Added IFrame on web page & given source as text file.It is working fine on Common printer.But,unable to print receipt through Receipt printer.It is coming as blank paper.

Printer name : PR-85 Thermal printer .Click below link to see printer specification details..

http://www.essae.com/popup_html/pr-85.html

Anybody have solution ?


回答1:


To get this working, simply setup your receipt printer as the default printer and rename it as "zebra":

Then simply download the jZebra - it's now evolved into qz-print library, and put the jar file in the project directory and hey presto:

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

<script>
      function print() {
       document.jzebra.append("PRINTED USING JZEBRA\n");
       document.jzebra.print();
      }
</script>



来源:https://stackoverflow.com/questions/13082482/how-to-print-a-receipt-through-receipt-printer-from-web-page-aspx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!