1404 attributes = new HashPrintRequestAttributeSet();
1405 attributes.add(new Copies(getCopies()));
1406 attributes.add(new JobName(getJobName(), null));
1407 }
1408 try {
1409 job.print(doc, attributes);
1410 } catch (PrintException e) {
1411 throw new PrinterException(e.toString());
1412 }
1413 }
1414
1415 /**
1416 * Prints a set of pages.
1417 * @exception java.awt.print.PrinterException an error in the print system
1418 * caused the job to be aborted
1419 * @see java.awt.print.Book
1420 * @see java.awt.print.Pageable
1421 * @see java.awt.print.Printable
1422 */
1423 public void print() throws PrinterException {
1424 print(attributes);
1425 }
1426
1427 public static boolean debugPrint = false;
1428 protected void debug_println(String str) {
1429 if (debugPrint) {
1430 System.out.println("RasterPrinterJob "+str+" "+this);
1431 }
1432 }
1433
1434 public void print(PrintRequestAttributeSet attributes)
1435 throws PrinterException {
1436
1437 /*
1438 * In the future PrinterJob will probably always dispatch
1439 * the print job to the PrintService.
1440 * This is how third party 2D Print Services will be invoked
1441 * when applications use the PrinterJob API.
1442 * However the JRE's concrete PrinterJob implementations have
1443 * not yet been re-worked to be implemented as standalone
|
1404 attributes = new HashPrintRequestAttributeSet();
1405 attributes.add(new Copies(getCopies()));
1406 attributes.add(new JobName(getJobName(), null));
1407 }
1408 try {
1409 job.print(doc, attributes);
1410 } catch (PrintException e) {
1411 throw new PrinterException(e.toString());
1412 }
1413 }
1414
1415 /**
1416 * Prints a set of pages.
1417 * @exception java.awt.print.PrinterException an error in the print system
1418 * caused the job to be aborted
1419 * @see java.awt.print.Book
1420 * @see java.awt.print.Pageable
1421 * @see java.awt.print.Printable
1422 */
1423 public void print() throws PrinterException {
1424 attributes.remove(PageRanges.class);
1425 print(attributes);
1426 }
1427
1428 public static boolean debugPrint = false;
1429 protected void debug_println(String str) {
1430 if (debugPrint) {
1431 System.out.println("RasterPrinterJob "+str+" "+this);
1432 }
1433 }
1434
1435 public void print(PrintRequestAttributeSet attributes)
1436 throws PrinterException {
1437
1438 /*
1439 * In the future PrinterJob will probably always dispatch
1440 * the print job to the PrintService.
1441 * This is how third party 2D Print Services will be invoked
1442 * when applications use the PrinterJob API.
1443 * However the JRE's concrete PrinterJob implementations have
1444 * not yet been re-worked to be implemented as standalone
|