File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes I/O and Streams and the fly likes Printing Postscript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Printing Postscript" Watch "Printing Postscript" New topic

Printing Postscript

Randall Fairman

Joined: Apr 18, 2011
Posts: 29

I need to print some fairly intricate graphics output, and it's been nearly 20 years (ouch) since I last had to program a complex printing routine. Back then I sent PostScript to an Apple LaserWriter, as though it was coming from a terminal (at least that's how I remember it). It turns out that my current project could best be solved in a similar way: a Java program composes PostScript on the fly, which is then sent to the printer. Yes, I'm aware of Graphics2D and what it has to offer, but PostScript is the most efficient way to solve my problem, provided that PostScript printers (or drivers) are so widespread these days that it's a non-issue.

So, that's my question: is it reasonable to assume that all printers in use today will accept PostScript? Put another way, it is reasonable to assume that the following two lines always return a value for the psPrinters array with at least one element?


Ramon Anger
Ranch Hand

Joined: Apr 19, 2011
Posts: 56

Hi Randall,

please take a look at

There you can read "... Still, some basic, inexpensive laser printers don't support PostScript ..."


Blackbelt on
Randall Fairman

Joined: Apr 18, 2011
Posts: 29
Thanks. It seems like nearly every printer these days comes with a driver that will accept postscript, although printers with a built-in PS interpreter are still very expensive. So, it does seem reasonable to assume that I can print by spouting PS (but not BS). The rare person whose printer won't take it is just out of luck.
I agree. Here's the link:
subject: Printing Postscript
It's not a secret anymore!