JDK-4869575 : Setting orientation in the page format does not have any effect on the printout
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.1,5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_nt,windows_xp
  • CPU: x86
  • Submitted: 2003-05-26
  • Updated: 2003-07-21
  • Resolved: 2003-07-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Related Reports
Duplicate :  
I have implemented the Printable interface in such a way that it is expected to print a string appended with the page index. I am calling PrinterJob.setPrintable() with an object of printable and a page format. Page Format object passed to the above method is set with a LANDSCAPE orientation (using setOrientation method). Once the printable and page format is set to the printerjob, I am popping up the PrintDialog and eventually calling the print method of PrinterJob. I am getting a print out in PORTRAIT orientation on Win32 platforms using JDK1.5.0-b05. This seem to work fine in all the builds prior to JDK1.5.0-b05 where I am getting a print out in LANDSCAPE orientation as expected. But in JDK1.5.0-b05, 06 and in the PIT build specified below, the print out still comes in PORTRAIT orientation though the page format is set with LANDSCAPE. But when I set the orientation in the native page dialog by calling PrinterJob.pageDialog() and set the page format returned by this page dialog to the printer job, i am getting the correct output which is LANDSCAPE, on all the builds. But this does not work when orientation is set using PageFormat.setOrientation() in the specified builds.

This bug is reproducible only on Win32 platforms. I tested this with Solaris 8, Win NT and Win XP using 1.3, 1.4.2-b24, 1.5.0 - b02 to b06 and the following PIT build.

java version "2d-jcg-win-01-23-May-03.tiger"
Java(TM) 2 Runtime Environment, Standard Edition (build 2d-jcg-win-01-23-May-03.tiger)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b07, mixed mode)

This is reproducible only from JDK1.5.0-b05. 

How to reproduce:
I have attached a sample code. Execute the sample code. If you get the print out in PORTRAIT orientation then the bug is reproduced.

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b10 VERIFIED IN: tiger

EVALUATION Committing to tiger. ###@###.### 2003-05-27 =================================== Problem is that orientation setting in the print properties dialog is still set to portrait even though PageFormat's orientation is set to Landscape. This is also evident in previous builds. Apparently, older version like 1.4.1 prints it in landscape so the bug is not obviously seen but in Tiger, print dialog settings like orientation are always copied into the internal state through attributes thereby whatever is set in the print dialog, in this case portrait, will also be printed as such. The fix is to make sure that printDialog() reflects the PageFormat's settings. ###@###.### 2003-06-04 ====================================