| Package | Description | 
|---|---|
| java.awt.print | Provides classes and interfaces for a general printing API. | 
| Modifier and Type | Method and Description | 
|---|---|
| PageFormat | PrinterJob. defaultPage()Creates a new  PageFormatinstance and
 sets it to a default size and orientation. | 
| abstract PageFormat | PrinterJob. defaultPage(PageFormat page)Clones the  PageFormatargument and alters the
 clone to describe a default page size and orientation. | 
| PageFormat | Pageable. getPageFormat(int pageIndex)Returns the  PageFormatof the page specified bypageIndex. | 
| PageFormat | Book. getPageFormat(int pageIndex)Returns the  PageFormatof the page specified bypageIndex. | 
| PageFormat | PrinterJob. getPageFormat(PrintRequestAttributeSet attributes)Calculates a  PageFormatwith values consistent with those
 supported by the currentPrintServicefor this job
 (ie the value returned bygetPrintService()) and media,
 printable area and orientation contained inattributes. | 
| abstract PageFormat | PrinterJob. pageDialog(PageFormat page)Displays a dialog that allows modification of a
  PageFormatinstance. | 
| PageFormat | PrinterJob. pageDialog(PrintRequestAttributeSet attributes)A convenience method which displays a cross-platform page setup dialog. | 
| abstract PageFormat | PrinterJob. validatePage(PageFormat page)Returns the clone of  pagewith its settings
 adjusted to be compatible with the current printer of thisPrinterJob. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | Book. append(Printable painter,
      PageFormat page)Appends a single page to the end of this  Book. | 
| void | Book. append(Printable painter,
      PageFormat page,
      int numPages)Appends  numPagespages to the end of thisBook. | 
| abstract PageFormat | PrinterJob. defaultPage(PageFormat page)Clones the  PageFormatargument and alters the
 clone to describe a default page size and orientation. | 
| abstract PageFormat | PrinterJob. pageDialog(PageFormat page)Displays a dialog that allows modification of a
  PageFormatinstance. | 
| int | Printable. print(Graphics graphics,
     PageFormat pageFormat,
     int pageIndex)Prints the page at the specified index into the specified
  Graphicscontext in the specified
 format. | 
| void | Book. setPage(int pageIndex,
       Printable painter,
       PageFormat page)Sets the  PageFormatand thePainterfor a
 specified page number. | 
| abstract void | PrinterJob. setPrintable(Printable painter,
            PageFormat format)Calls  painterto render the pages in the specifiedformat. | 
| abstract PageFormat | PrinterJob. validatePage(PageFormat page)Returns the clone of  pagewith its settings
 adjusted to be compatible with the current printer of thisPrinterJob. | 
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2017, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.