What are the causes of large spool files from java.awt.print.PrinterJob and how can I avoid them?
This was much more of a problem in earlier releases but as of J2SE 5.0 most applications should not see a problem. Some of it is platform specific and in general things are better on Windows than Solaris and Linux. Printing using non opaque colours, gradient paints, and custom paints can cause individual pages (not the whole print job) to be generated as a raster at device resolution. This can be mitigated in a few ways: • the application printing code could avoid using these. • the application could render a selected area which uses these to an offscreen opaque BufferedImage and then draw that BufferedImage to the printer graphics. • the application could lower the device resolution of the print job which may be higher than needed, using the PrinterResolution attribute. Printing Text on Solaris with non-Postscript standard fonts.