• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Printing on line printers

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello ppl ^^
I'm actually developing a webapp for printing some receipts that are generated on a system made on Ruby on Rails (with actually almost no documentation for serial/printer communication).

So, my problem is: I've got some "line printers" (here in Brazil also called "matricial" which would mean "matrix" although I think that this is a bit wrong as these printers have a fixed character set) and need to make Java print on it! I found the documentation about javax.print package but actually haven't found if it works with this old type of printers... Anyone have a clue about it?

Thanks for the attention
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch.
Your first step should be to contact the printer manufacturer. They may have an API or driver to interface with the printer. The javax.print API sits on top of the OS's print functionality, so if you can't print from your OS, you can't use javax.print from within Java.
Can you use ASCII characters to control the printer (i.e. CR, LF, FF and so on)? You may be able to just send them and plain characters to the printer via the serial port.
 
Victor Campos
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Uhmm, that's a good solution, I did it a while ago but using C++ and serial port communication, but as my application will have to communicate with a database I sorta dropped C++, so gotta try this on Java

Thanks again!
[ September 17, 2007: Message edited by: Victor Campos ]
 
Be reasonable. You can't destroy everything. Where would you sit? How would you read a tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic