JDK-4876267 : javax.print.DocPrintJob does not honor PrintRequestAttributeSet
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2003-06-09
  • Updated: 2003-06-17
  • Resolved: 2003-06-17
Description

Name: rmT116609			Date: 06/09/2003


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

FULL OS VERSION :
Microsoft Windows XP [Version 5.1.2600]
Windows NT Version 4.0

A DESCRIPTION OF THE PROBLEM :
When attempting to print to any printer selected using
PrintJob.printDialog(PrintRequestAttributeSet) or ServiceUI.printDialog(...), DocPrintJob.print(SimpleDoc, PrintRequestAttributeSet) does not honor the attribute set.

I can tell via code that the attribute set is being populated, but DocPrintJob does not send the values to the printer or does not honor the attribute set.


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
* Run the application(PrintTest) under J2SE v1.4
* Select File->Print...
* When the Print Dialog appears, set any values that you wish

Note: make sure you have some file named memo.txt in the same directory.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The contents of memo.txt should be printed out based on the printer settings.

If the settings are:

2 copies
Landscape
Duplex

The result should be 2 copies, landscape duplex.
ACTUAL -
The text is printed 1 copy, portrait.  Even the printer defaults are ignored.

Printer Defaults:
Landscape
Duplex

I have seen this result on:

* HP LaserJet 4050 Series PCL 6
* HP LaserJet 8100 Series PCL 6

Print Driver Information:
-------------------------
HP LaserJet 4050 Series PCL 6 Printer Driver
version: 4.3.2.177
 
HP LaserJet 8100 Series PCL 6 Printer Driver
version: 4.3.2.177
 
Note: Both of these printers are managed via Novell Directory Print Services

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------

Please see the attached "185882.zip" file.

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

(Review ID: 185882) 
======================================================================

Comments
EVALUATION ==================================== The chosen DocFlavor which is INPUT_STREAM.AUTOSENSE does not support some attributes like orientation so setting this would be useless. The code in line 56 of JPSPrint.java should be changed to printService = ServiceUI.printDialog(null, 50, 50, printServices, defaultService, docFormat, // DocFlavor printAttributes); to see that these attributes are disabled in the print dialog. ###@###.### 2003-06-17 ====================================
17-06-2003