Java programming to print shopping receipt implementation code

Briefly introduce the operating environment:

Language: Java

Tool: Eclipse

System: windows7

(there is no printing device at present, so only preview images can be provided)

Recently, the project needs to do a shopping ticket printing function for the mall. Every day when we go to the supermarket to buy things, the cashier will print a small ticket when checking out. Generally, the mall also needs such a small function. The demo given in this paper is an example of a 58mm thermal printer. If it is a printer of other paper types, adjust the paper width.

Operation results:

Effect preview:

summary

In short, it is very simple to write a java program, save the output result as a "*. XPS" format file and output it by the printer. I hope it will help you. If you have any questions, please leave a message. Thank you for your support.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>