JDK-4701198 : Unable to specify tray for printing on HP Color Laserjet 4500
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2002-06-12
  • Updated: 2003-04-12
  • Resolved: 2002-09-27
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.
Other Other
1.4.1_01 01Fixed 1.4.2Fixed
Description

Name: jk109818			Date: 06/12/2002


FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

FULL OPERATING SYSTEM VERSION : Microsoft Windows 2000
[Version 5.00.2195]


ADDITIONAL OPERATING SYSTEMS : Various other versions
Windows



EXTRA RELEVANT SYSTEM CONFIGURATION :
Printer: HP Color Laserjet 4500
Using the javax.print.* (JPS) classes.

A DESCRIPTION OF THE PROBLEM :
It's not possible to choose or use any tray other than the
default tray on several printers. I can verify it with an
HP Color Laserjet 4500. Some types of Kyocera seem to have
the same problem.
The problem seems to be that the driver uses 'device
specific' bin numbers/names.

Output from DeviceCapabilities / DC_BINS / DC_BINNAMES
(Win32 API):

Printer: [HP Color LaserJet 4500]
- 15, 'Automatically Select'
- 7, 'Auto Select'
- 259, 'Tray 1'
- 258, 'Tray 2'
- 257, 'Tray 3'

I suspect JPS ignores bin-numbers > 256.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Use javax.print.ServiceUI.printDialog
2. Choose the printer.
3. In the Page Setup / Source combo-box the only choices
are now:
- Automatically Select
- Form Source
- Automatic Feeder

EXPECTED VERSUS ACTUAL BEHAVIOR :
Excpected (in that combobox) are:
- Automatically Select
- Form Source
- Automatic Feeder
- Tray 1
- Tray 2
- Tray 3

This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import javax.print.*;
import javax.print.attribute.*;

public class TrayTest
{
	public static void main(String[] args)
	{
		// Get a list of printservices.
		PrintService[] services =
			PrintServiceLookup.lookupPrintServices(
				DocFlavor.SERVICE_FORMATTED.PRINTABLE, null);
		// No special attributes requested.
		PrintRequestAttributeSet attributes
			= new HashPrintRequestAttributeSet();
		// Show a printDialog.
		PrintService service =  ServiceUI.printDialog(null, 50, 50,
			services, null, null, attributes);
		System.exit(0);
	}
}

---------- END SOURCE ----------

CUSTOMER WORKAROUND :
If you need JPS: None.
Otherwise java.awt.print.PrinterJob.printDialog()
(Review ID: 144511) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.1_01 mantis mantis-b02 FIXED IN: 1.4.1_01 mantis mantis-b02 INTEGRATED IN: 1.4.1_01 mantis mantis-b02 mantis-b04
14-06-2004

EVALUATION Same problem with media sizes. All of driver's supported media size/trays should be available for selection in the printDialog. Fix is to create new MediaSizeNames or MediaTrays for those that are not predefined in javax.print. ###@###.### 2002-07-24 We also need to take into consideration the MediaPrintableArea of all the new MediaSizeNames (e.g. custom paper sizes). ###@###.### 2002-09-24 Fixed wrong printable area in 1.4.1_01 and mantis. ###@###.### 2002-09-25
24-09-2002