The JavaTM Tutorial
Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Trail: 2D Graphics
Lesson: Solving Common 2D Graphics Problems

Improving Printing Performance

Starting in 1.3, two strategies should help reduce the size of printer spool files, improve printing performance, and even improve print quality:

Starting in 1.4.1, you can greatly reduce printer file sizes when printing to black-and-white printers on Solaris and Linux. The trick is to explicitly make sure that everything you send to the printer is some shade of gray (which includes black and white). This takes advantage of better compression for grayscale.

To do this, make sure that all colors and paints use gray only, and that all images are first converted to grayscale. One way of doing this is to redraw an original color image into a grayscale image of the same dimensions, and then send the new grayscale image to the printer.

We cannot automatically do this conversion as then you would be unable to print in color at all. Since Postscript printers are predominantly B&W, you might decide that you can benefit from this tip when you know the nature of the output device. The tip doesn't apply when printing to printers attached to Windows machines because they use GDI -- not our own Postscript generator -- to generate printer files.


Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Copyright 1995-2005 Sun Microsystems, Inc. All rights reserved.