wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Printing on line printers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Printing on line printers" Watch "Printing on line printers" New topic
Author

Printing on line printers

Victor Campos
Greenhorn

Joined: Sep 17, 2007
Posts: 4
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

Joined: Oct 29, 2001
Posts: 8836
    
    7

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.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Victor Campos
Greenhorn

Joined: Sep 17, 2007
Posts: 4
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Printing on line printers
 
Similar Threads
Mock Assignment - let's create one after Google Cloud Printing
Looking for printing code samples
Unable to find print services
example on escape sequence( "\r") ?
Print MS Office documents using unix commands