< prev index next >
src/java.desktop/unix/classes/sun/print/UnixPrintJob.java
Print this page
rev 59383 : [mq]: final
*** 1,7 ****
/*
! * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 886,920 ****
ncomps+=1;
} else if (getPrintService().
isAttributeCategorySupported(JobSheets.class)) {
ncomps+=1;
}
- if (PrintServiceLookupProvider.osname.equals("SunOS")) {
- ncomps+=1; // lp uses 1 more arg than lpr (make a copy)
- execCmd = new String[ncomps];
- execCmd[n++] = "/usr/bin/lp";
- execCmd[n++] = "-c"; // make a copy of the spool file
- if ((pFlags & PRINTER) != 0) {
- execCmd[n++] = "-d" + printer;
- }
- if ((pFlags & JOBTITLE) != 0) {
- String quoteChar = "\"";
- execCmd[n++] = "-t " + quoteChar+jobTitle+quoteChar;
- }
- if ((pFlags & COPIES) != 0) {
- execCmd[n++] = "-n " + copies;
- }
- if ((pFlags & NOSHEET) != 0) {
- execCmd[n++] = "-o nobanner";
- } else if (getPrintService().
- isAttributeCategorySupported(JobSheets.class)) {
- execCmd[n++] = "-o job-sheets=standard";
- }
- if ((pFlags & OPTIONS) != 0) {
- execCmd[n++] = "-o " + options;
- }
- } else {
execCmd = new String[ncomps];
execCmd[n++] = "/usr/bin/lpr";
if ((pFlags & PRINTER) != 0) {
execCmd[n++] = "-P" + printer;
}
--- 886,895 ----
*** 931,941 ****
execCmd[n++] = "-o job-sheets=standard";
}
if ((pFlags & OPTIONS) != 0) {
execCmd[n++] = "-o" + options;
}
- }
execCmd[n++] = spoolFile;
if (IPPPrintService.debugPrint) {
System.out.println("UnixPrintJob>> execCmd");
for (int i=0; i<execCmd.length; i++) {
System.out.print(" "+execCmd[i]);
--- 906,915 ----
< prev index next >