Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4701198
Votes 3
Synopsis Unable to specify tray for printing on HP Color Laserjet 4500
Category java:classes_2d
Reported Against 1.4
Release Fixed 1.4.1_01
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs
Submit Date 12-JUN-2002
Description




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  xxxxx  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  xxxxx  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) 
======================================================================
Work Around
N/A
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.

 xxxxx@xxxxx  2002-07-24

We also need to take into consideration the MediaPrintableArea of all the new MediaSizeNames (e.g. custom paper sizes).

 xxxxx@xxxxx  2002-09-24

Fixed wrong printable area in 1.4.1_01 and mantis.

 xxxxx@xxxxx  2002-09-25
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang