6750383: 2D_PrintingTiger\PrintDocOrientationTest fails, wrong orientated images are printed
authorjgodinez
Tue, 24 Feb 2009 14:32:17 -0800
changeset 2386 7e59f81fd05b
parent 2385 bfc8967dfe97
child 2387 2e932319f001
6750383: 2D_PrintingTiger\PrintDocOrientationTest fails, wrong orientated images are printed Reviewed-by: campbell, prr
jdk/src/solaris/classes/sun/print/IPPPrintService.java
jdk/src/solaris/classes/sun/print/UnixPrintJob.java
--- 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) {