Documentation Contents
CONTENTS | PREV | NEXT
CHAPTER 5

Printing and Streaming 2D Graphics




The Java 2D printing API is the java.awt.print package and provides for creating a PrinterJob, displaying a printer dialog to the user, and printing paginated graphics using the same java.awt.Graphics and java.awt.Graphics2D classes that are used to draw to the screen.

Many of the features in the Java Print Service, such as printer discovery and specification of printing attributes, are also very important to users of the Java 2D printing API. To make these features available to users of Java 2D printing, the java.awt.print package allows access to the Java Print Service from the Java 2D printing API.

Developers of Java 2D printing applications have four ways of using the Java Print Service with the Java 2D API:

The Using PrinterJob to Print or Stream Graphics section explains the first two methods. The Using Service-Formatted Data section explains the other two methods.

CONTENTS | PREV | NEXT

Oracle and/or its affiliates Copyright © 1993, 2019, Oracle and/or its affiliates. All rights reserved.
Contact Us