• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing on line printers

 
Victor Campos
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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
 
Joe Ess
Bartender
Posts: 9314
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • 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
  • 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 ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic