JDK-4673406 : RFE: Java Printing: Provide a way to display win32 printer driver's dialog
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.0,5.0
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_nt,windows_xp
  • CPU: x86
  • Submitted: 2002-04-23
  • Updated: 2014-02-14
  • Resolved: 2013-08-30
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.
JDK 7 JDK 8
7u60Fixed 8 b108Fixed
Description

Name: rl43681			Date: 04/23/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 :
Windows NT Version 4.0

A DESCRIPTION OF THE PROBLEM :
On Windows, the OS allows to display printer-specific
options dialogs (as can be reached via the "Properties"
button on a typical Windows "Print" dialog), via the
DocumentProperties system call, AFAIK.
It is required that the JDK allows to display those
printer-specific dialogs via some API call.

This bug can be reproduced always.
(Review ID: 145210) 
======================================================================

feedback from a CAP member:

To invoke  Windows printer-specific options dialog,
excute the following command line :

RUNDLL32 PRINTUI.DLL,PrintUIEntry /e /n "printer name"


sample code fragment:

  PrintService[] ps = 
PrintServiceLookup.lookupPrintServices(DocFlavor.SERVICE_FORMATTED.PRINTABLE, 
null);

  String printerName = ps[0].getName();
  String cmd = "RUNDLL32 PRINTUI.DLL,PrintUIEntry /e /n \""+ printerName 
+ "\"";
  try{
    Runtime.getRuntime().exec( cmd );
  }
  catch( Exception exc ){
    exc.printStackTrace();
  }


Comments
isn't a bug fix, its an RFE. We've not made it a requirement to add "regression" tests when we add new functionality. In any case this isn't API testable.
29-10-2013

EVALUATION This request is very specifically requesting that the new cross-platform print dialog in JDK 1.4 be enhanced such that for win32 native printers the JDK displays the print vendor supplied properties sheet. To do this we need to 1) confirm it is possible to always and reliably display that property sheet without displaying the main windows print dialog, 2) find a way to pop-up this dialog from the executing thread without blocking other events 3) identify a way to communicate (via DEVMODE) the changes that the user makes in this dialog back into the AttributeSet where possible (for changes to windows standard properties) and other non-standard printjob to any subsequent print job. Because of this latter point is likely that supporting this sheet will only be possible where there is already a job with which to make the association. ie using java.awt.PrinterJob.printDialog(AttributeSet) and not for direct uses with javax.print.ServiceUI.printDialog(..) Also changes made in the vendor private area of the DEVMODE which cannot be detected and are also addressed by javax.print APIs may potentially lead to conflicing settings which there is no way to communicate and reconcile. Commitment to implement this feature is subject to satisfactory solution to these technical risks. ###@###.### 2002-04-25 ============================
25-04-2002