簡體   English   中英

如何使用Java Applet將原始數據發送到打印機

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

提前致謝。

我是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,這是可能的。 我在互聯網上搜索此問題,但仍然找不到適合我需要的正確解決方案。

請幫我解決問題。

再次感謝。

https://code.google.com/p/jzebra/提供了一個很好的界面,可通過javascript與打印機進行通訊。 最終,java applet完成了任務。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM