1

提前致谢。

我是 Java Applet 的新手,我会告诉我的要求并希望能得到解决方案。

这是我的 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>

现在,如果有人单击按钮,则“text_to_print” div 中的内容应直接在点阵打印机中打印,而无需打印机对话框。

我的一位朋友告诉我,如果我们使用 Applet,这是可能的。我在互联网上搜索这方面的内容,但我仍然无法获得适合我需要的解决方案。

请帮我解决问题。

再次提前感谢。

4

1 回答 1

0

https://code.google.com/p/jzebra/ 提供了一个很好的界面来通过 javascript 与打印机对话。最终,Java 小程序完成了这项工作。

于 2013-06-25T19:49:29.727 回答