wood burning stoves 2.0*
The moose likes Java in General and the fly likes Printing with POS Printer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Printing with POS Printer" Watch "Printing with POS Printer" New topic
Author

Printing with POS Printer

A.G Rajkotia
Greenhorn

Joined: Aug 11, 2011
Posts: 28
Hie,

I have been working on a Billing Application and now its almost complete. I'm stuck on printing the bill. The problem is that when i print the bill on my normal printer (A4 Size paper) it works fine, but when I print it on a POS printer (Epson LX 300+), I get some strange printing. Are there any special API for POS Printing. Any tutorial, code, help on POS printing is welcomed.

Thanking you in advance,
A.G Rajkotia.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

How are you printing it on the POS printer and what exactly is going wrong; is just the formatting wrong (maybe because the paper isn't as wide as an A4)?


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
A.G Rajkotia
Greenhorn

Joined: Aug 11, 2011
Posts: 28
I'm using java.awt.print library . part of code is given below



Code inside the Bill class is like this


This prints the table well with the normal all in one desktop printer, but when i use the POS printer, letters are too closely printed making it difficult to read. I tried new JTextArea("Hello World").print(); but still got the same results.

A.G Rajkotia
Greenhorn

Joined: Aug 11, 2011
Posts: 28
Its a 9 pin dot Matrix Printer (Epson lx 300 + ii) . Is there anything to do with the font ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Printing with POS Printer
 
Similar Threads
Printing in Landscape
Printing at Client Side via MVC program
Print a document using java API
Using applet to print
Problem in printing Jpanel Data