-
Bug
-
Resolution: Fixed
-
P3
-
6u26
-
b24
-
x86
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8056764 | emb-9 | Unassigned | P3 | Resolved | Fixed | b24 |
JDK-8063746 | 8u45 | Jennifer Godinez | P3 | Resolved | Fixed | b01 |
JDK-8050267 | 8u40 | Jennifer Godinez | P3 | Resolved | Fixed | b01 |
JDK-8070197 | emb-8u47 | Jennifer Godinez | P3 | Resolved | Fixed | team |
FULL PRODUCT VERSION :
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux 2.6.35.13-92.fc14.i686.PAE #1 SMP i686 i686 i386 GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
cups-1.4.6-1.fc14.i686
A DESCRIPTION OF THE PROBLEM :
Regardless the default media setup in cups, java always uses the first media from ppd.
I sniffered the IPP communication between cups and java:
...Dmedia-defaultiso_a3_297x420mmDmedia-supportediso_a4_210x297mmDiso_a3_297x420mmD...
--> The default media is passed to java
When debugging the IPPPrintService, the the defaultMediaIndex is 0 and the getAttMap contains only "media-default=media-default" (no valid media) which seems to be the problem.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Add cups printer (as default printer))
2. Change default media size in cups to A3
3. Run code-snippet (see below)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The default media size should be A3.
ACTUAL -
The default media is the first media.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.print.PrintService;
import javax.print.PrintServiceLookup;
import javax.print.attribute.standard.Media;
public class TestPrinterDefaultMedia {
public static void main(final String[] args) {
final PrintService printService = PrintServiceLookup
.lookupDefaultPrintService();
// should return iso-a3
System.out.println(printService.getDefaultAttributeValue(Media.class));
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Set default media at top position of media list in ppd file.
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux 2.6.35.13-92.fc14.i686.PAE #1 SMP i686 i686 i386 GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
cups-1.4.6-1.fc14.i686
A DESCRIPTION OF THE PROBLEM :
Regardless the default media setup in cups, java always uses the first media from ppd.
I sniffered the IPP communication between cups and java:
...Dmedia-defaultiso_a3_297x420mmDmedia-supportediso_a4_210x297mmDiso_a3_297x420mmD...
--> The default media is passed to java
When debugging the IPPPrintService, the the defaultMediaIndex is 0 and the getAttMap contains only "media-default=media-default" (no valid media) which seems to be the problem.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Add cups printer (as default printer))
2. Change default media size in cups to A3
3. Run code-snippet (see below)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The default media size should be A3.
ACTUAL -
The default media is the first media.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.print.PrintService;
import javax.print.PrintServiceLookup;
import javax.print.attribute.standard.Media;
public class TestPrinterDefaultMedia {
public static void main(final String[] args) {
final PrintService printService = PrintServiceLookup
.lookupDefaultPrintService();
// should return iso-a3
System.out.println(printService.getDefaultAttributeValue(Media.class));
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Set default media at top position of media list in ppd file.
- backported by
-
JDK-8050267 Default printer media is ignored
- Resolved
-
JDK-8056764 Default printer media is ignored
- Resolved
-
JDK-8063746 Default printer media is ignored
- Resolved
-
JDK-8070197 Default printer media is ignored
- Resolved