JDK-6601097 : Margins are not reset to hardware margins when width/height is 0 or -ve alongwith x,y
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0,9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-09-05
  • Updated: 2016-07-14
  • Resolved: 2016-06-23
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.
JDK 9
9 b127Fixed
Related Reports
Relates :  
Description
6543815 Imageable area of PageFormat is ignored if values of imageable X/Y are negative

- The above bug resets the x,y to 0 if they are negative before creating a MediaPrintableArea and the platform replaces it with hardware margins when printing. This works only if x/y is negative. If either width/height is negative alongwith x or y, then the margin is set to the java def 1 inch margin and not hardware margins. So x,y being -ve and x,y,width,height being -ve are handled differently.

Reprodcible on WinXP with Photon Phaser 5500DN, atleast since JDK5.

I have attached a sample test. Execute the sample test. Click ok on the page and print dialog. When you see java margins printed on the console, the bug is reproduced.