• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Printing with POS Printer

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)?
 
A.G Rajkotia
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its a 9 pin dot Matrix Printer (Epson lx 300 + ii) . Is there anything to do with the font ?
 
roses are red, violets are blue. Some poems rhyme and some are a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic