United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4701198 : Unable to specify tray for printing on HP Color Laserjet 4500

Details
Type:
Bug
Submit Date:
2002-06-12
Status:
Resolved
Updated Date:
2003-04-12
Project Name:
JDK
Resolved Date:
2002-09-27
Component:
client-libs
OS:
windows_2000
Sub-Component:
2d
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
1.4.1_01 (01)

Related Reports
Backport:

Sub Tasks

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


                                     
2004-06-14
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
                                     
2002-09-24



Hardware and Software, Engineered to Work Together