6750383: 2D_PrintingTiger\PrintDocOrientationTest fails, wrong orientated images are printed
Reviewed-by: campbell, prr
--- a/jdk/src/solaris/classes/sun/print/IPPPrintService.java Fri Feb 06 20:49:53 2009 +0300
+++ b/jdk/src/solaris/classes/sun/print/IPPPrintService.java Tue Feb 24 14:32:17 2009 -0800
@@ -661,6 +661,12 @@
}
}
} else if (category == OrientationRequested.class) {
+ if (flavor.equals(DocFlavor.INPUT_STREAM.POSTSCRIPT) ||
+ flavor.equals(DocFlavor.URL.POSTSCRIPT) ||
+ flavor.equals(DocFlavor.BYTE_ARRAY.POSTSCRIPT)) {
+ return null;
+ }
+
boolean revPort = false;
OrientationRequested[] orientSup = null;
--- a/jdk/src/solaris/classes/sun/print/UnixPrintJob.java Fri Feb 06 20:49:53 2009 +0300
+++ b/jdk/src/solaris/classes/sun/print/UnixPrintJob.java Tue Feb 24 14:32:17 2009 -0800
@@ -362,10 +362,10 @@
mOptions += " number-up="+nUp.getValue();
}
- if (orient == OrientationRequested.LANDSCAPE &&
+ if (orient != OrientationRequested.PORTRAIT &&
(flavor != null) &&
!flavor.equals(DocFlavor.SERVICE_FORMATTED.PAGEABLE)) {
- mOptions += " landscape";
+ mOptions += " orientation-requested="+orient.getValue();
}
if (sides != null) {