Reputation:
I want to generate a .prn file using Java.
Upvotes: 0
Views: 3361
Reputation: 75426
A PRN is the byte stream which would be sent to the printer to generate the output, and is generated by the printer driver. Postscript printers get PostScript and HP printers usually get PCL etc.
In order to replicate the behaviour you need a compatible driver in the Java Printing Service
http://java.sun.com/javase/technologies/desktop/printing/
See http://www.exampledepot.com/egs/javax.print/pkg.html for some short sample programs, and investigate what printers you have available on the system.
Upvotes: 2
Reputation: 112414
A prn file is printer specific; it's just Windows' way of intercepting the output sent to a print for printing later. Regular Java printing can be directed to a file.
Upvotes: 1