Reputation: 783
I have a generated post script file and want to print using it. How can it be achieved in java either using javax print API or AWT. Is it possible?
Upvotes: 3
Views: 3597
Reputation: 10637
Complicated. Does your printer(s) support PostScript? Is it networked? If so, most networked printers can talk LPR and you can shove the file over as-is. On Windows, you could also stream the file as-is to the lpt1:
mapped port via something like NET USE LPT1: \\[Computer Name]\Printer /PERSISTENT:YES
.
If you're on a server and you do lots of PostScript handling and your printer infrastructure supports it, I would very much look into the LPR protocol. I've written several LPR/LPD management functions in Java to handle printer jobs, so definetely know it can be done with some relative ease.
http://tools.ietf.org/pdf/rfc1179.pdf
Upvotes: 2