493 } 494 495 /** 496 * Returns the clone of {@code page} with its settings 497 * adjusted to be compatible with the current printer of this 498 * {@code PrinterJob}. For example, the returned 499 * {@code PageFormat} could have its imageable area 500 * adjusted to fit within the physical area of the paper that 501 * is used by the current printer. 502 * @param page the {@code PageFormat} that is cloned and 503 * whose settings are changed to be compatible with 504 * the current printer 505 * @return a {@code PageFormat} that is cloned from 506 * {@code page} and whose settings are changed 507 * to conform with this {@code PrinterJob}. 508 */ 509 public abstract PageFormat validatePage(PageFormat page); 510 511 /** 512 * Prints a set of pages. 513 * @exception PrinterException an error in the print system 514 * caused the job to be aborted. 515 * @see Book 516 * @see Pageable 517 * @see Printable 518 */ 519 public abstract void print() throws PrinterException; 520 521 /** 522 * Prints a set of pages using the settings in the attribute 523 * set. The default implementation ignores the attribute set. 524 * <p> 525 * Note that some attributes may be set directly on the PrinterJob 526 * by equivalent method calls, (for example), copies: 527 * {@code setCopies(int)}, job name: {@code setJobName(String)} 528 * and specifying media size and orientation though the 529 * {@code PageFormat} object. 530 * <p> 531 * If a supported attribute-value is specified in this attribute set, 532 * it will take precedence over the API settings for this print() | 493 } 494 495 /** 496 * Returns the clone of {@code page} with its settings 497 * adjusted to be compatible with the current printer of this 498 * {@code PrinterJob}. For example, the returned 499 * {@code PageFormat} could have its imageable area 500 * adjusted to fit within the physical area of the paper that 501 * is used by the current printer. 502 * @param page the {@code PageFormat} that is cloned and 503 * whose settings are changed to be compatible with 504 * the current printer 505 * @return a {@code PageFormat} that is cloned from 506 * {@code page} and whose settings are changed 507 * to conform with this {@code PrinterJob}. 508 */ 509 public abstract PageFormat validatePage(PageFormat page); 510 511 /** 512 * Prints a set of pages. 513 * If {@code print(PrintRequestAttributeSet attributes)} is called before 514 * this method for the same PrinterJob, it is expected to use/carryover the 515 * same attributes set passed to 516 * {@code print(PrintRequestAttributeSet attributes)} 517 * @exception PrinterException an error in the print system 518 * caused the job to be aborted. 519 * @see Book 520 * @see Pageable 521 * @see Printable 522 */ 523 public abstract void print() throws PrinterException; 524 525 /** 526 * Prints a set of pages using the settings in the attribute 527 * set. The default implementation ignores the attribute set. 528 * <p> 529 * Note that some attributes may be set directly on the PrinterJob 530 * by equivalent method calls, (for example), copies: 531 * {@code setCopies(int)}, job name: {@code setJobName(String)} 532 * and specifying media size and orientation though the 533 * {@code PageFormat} object. 534 * <p> 535 * If a supported attribute-value is specified in this attribute set, 536 * it will take precedence over the API settings for this print() |