-
Bug
-
Resolution: Fixed
-
P2
-
1.1, 1.1.2, 1.1.3
-
1.1.5
-
generic, x86
-
generic, windows_95, windows_nt
-
Not verified
On a win95 machine, GetPageResolution is returning 300 but GetPageSize returns
612x792, which implies that the paper is 2.04 x 2.64 inches instead of 8.5 x 11
inches.
============================================================================
Using getPageDimension() returns:
Page Dimensions: 841/595 (WinNT & Solaris)
The printable area on WinNT is 1050/795
and on Solaris 841/595
Using getPageResolution () returns:
600 (WinNT), 72 (Solaris)
Both are using the same printer:
HP LaserJet 4/4M Plus PS 600
Solaris is print to a PostScript printer.
====================================================================
Additional information from Netiva:
> Bug fix 3: PrintJob.getPageDimension() has problems.
> a) Documentation says this Dimension is in pixel values. This is
> incorrect the value returned is in points (72 dpi).
> b) Code in AwtGraphics::StartPrintJob() does not retrieve page size
> information correctly. There are extensive comments around our fix which
> starts at line 964 of the attached file. Basically using DEVMODE
> dmPaperWidth and Length is not a reliable way to get the size of a page.
> The generally accepted way to do this is to use GetDeviceCaps as outlined
> in the attached code.
> c) Using the DEVMODE structure for getPageDimension() yields erroneous
> results when the user selects landscape orientation. The values are for
> portrait mode regardless of what the user selects. Using GetDeviceCaps()
> does not suffer from this problem; it reflects the orientation that the
> user selects in the print dialog box.
612x792, which implies that the paper is 2.04 x 2.64 inches instead of 8.5 x 11
inches.
============================================================================
Using getPageDimension() returns:
Page Dimensions: 841/595 (WinNT & Solaris)
The printable area on WinNT is 1050/795
and on Solaris 841/595
Using getPageResolution () returns:
600 (WinNT), 72 (Solaris)
Both are using the same printer:
HP LaserJet 4/4M Plus PS 600
Solaris is print to a PostScript printer.
====================================================================
Additional information from Netiva:
> Bug fix 3: PrintJob.getPageDimension() has problems.
> a) Documentation says this Dimension is in pixel values. This is
> incorrect the value returned is in points (72 dpi).
> b) Code in AwtGraphics::StartPrintJob() does not retrieve page size
> information correctly. There are extensive comments around our fix which
> starts at line 964 of the attached file. Basically using DEVMODE
> dmPaperWidth and Length is not a reliable way to get the size of a page.
> The generally accepted way to do this is to use GetDeviceCaps as outlined
> in the attached code.
> c) Using the DEVMODE structure for getPageDimension() yields erroneous
> results when the user selects landscape orientation. The values are for
> portrait mode regardless of what the user selects. Using GetDeviceCaps()
> does not suffer from this problem; it reflects the orientation that the
> user selects in the print dialog box.
- duplicates
-
JDK-4074183 Incorrect Page Size from PrintJob
- Closed
- relates to
-
JDK-4084038 Win32 printing: Frequent crashes, page scaled down
- Closed
-
JDK-4078973 Printing renders opaquely on win32, where screen rendering is transparent.
- Closed
-
JDK-4079786 Solaris print job returns incorrect page dimensions.
- Closed