Example usage for Java java.awt.print PrinterJob fields, constructors, methods, implement or subclass
The text is from its open source code.
PageFormat | defaultPage() Creates a new PageFormat instance and sets it to a default size and orientation. |
PageFormat | defaultPage(PageFormat page) Clones the PageFormat argument and alters the clone to describe a default page size and orientation. |
PrinterJob | getPrinterJob() Creates and returns a PrinterJob which is initially associated with the default printer. |
PrintService | getPrintService() Returns the service (printer) for this printer job. |
PrintService[] | lookupPrintServices() A convenience method which looks up 2D print services. |
PageFormat | pageDialog(PageFormat page) Displays a dialog that allows modification of a PageFormat instance. |
PageFormat | pageDialog(PrintRequestAttributeSet attributes) A convenience method which displays a cross-platform page setup dialog. |
void | print() Prints a set of pages. |
void | print(PrintRequestAttributeSet attributes) Prints a set of pages using the settings in the attribute set. |
boolean | printDialog() Presents a dialog to the user for changing the properties of the print job. |
boolean | printDialog(PrintRequestAttributeSet attributes) A convenience method which displays a cross-platform print dialog for all services which are capable of printing 2D graphics using the Pageable interface. |
void | setCopies(int copies) Sets the number of copies to be printed. |
void | setJobName(String jobName) Sets the name of the document to be printed. |
void | setPageable(Pageable document) Queries document for the number of pages and the PageFormat and Printable for each page held in the Pageable instance, document . |
void | setPrintable(Printable painter) Calls painter to render the pages. |
void | setPrintable(Printable painter, PageFormat format) Calls painter to render the pages in the specified format . |
void | setPrintService(PrintService service) Associate this PrinterJob with a new PrintService. |
PageFormat | validatePage(PageFormat page) Returns the clone of page with its settings adjusted to be compatible with the current printer of this PrinterJob . |