简体   繁体   English

如何使用Java Applet将原始数据发送到打印机

[英]How to send raw data to Printer with Java Applet

Thanks in Advance. 提前致谢。

I am new to Java Applet, i will tell my requirement and hope will get solution. 我是Java Applet的新手,我将告诉我自己的要求,并希望能找到解决方案。

This is my Html Coding 这是我的HTML编码

<html>
<head><title>Test Print Via Applet</title></head>
<body>
<div id="text_to_print">
This is my Office<br />
This is my Office Address<br />
<center>Header of the Receipt</center><br />
1. Product 1          100.00<br />
2. Product 2          200.00<br />
                      ------<br />
TOTAL                 300.00<br />
                      ------<br />
Thanks for the Purchase.
</div>
<input type="button" value="Print Directly to the Dot Matrix by using Applet" />
</body>
</html>

Now, if anyone click the Button the contend inside the "text_to_print" div should print in the dot matrix printer directly without printer dialog. 现在,如果有人单击按钮,则“ text_to_print” div中的内容应直接在点阵打印机中打印,而无需打印机对话框。

One of my Friend told me that, this is possible if we use Applet. 我的一位朋友告诉我,如果使用Applet,这是可能的。 I search regard this on internet, but still I couldn't get the right solution for me need. 我在互联网上搜索此问题,但仍然找不到适合我需要的正确解决方案。

Please help me to solve the issue. 请帮我解决问题。

Once again thanks in advance. 再次感谢。

https://code.google.com/p/jzebra/ Provides aa great interface to talk to the printer through javascript. https://code.google.com/p/jzebra/提供了一个很好的界面,可通过javascript与打印机进行通讯。 Eventually the java applet does the job. 最终,java applet完成了任务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM