United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4673406 : RFE: Java Printing: Provide a way to display win32 printer driver's dialog

Details
Type:
Enhancement
Submit Date:
2002-04-23
Status:
Resolved
Updated Date:
2014-02-14
Project Name:
JDK
Resolved Date:
2013-08-30
Component:
client-libs
OS:
windows_nt,windows_xp
Sub-Component:
2d
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.4.0,5.0
Fixed Versions:

Related Reports
Backport:
Backport:

Sub Tasks

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.
                                     
2013-10-29
URL:   http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/dc09174469ef
User:  lana
Date:  2013-09-18 00:31:25 +0000

                                     
2013-09-18
URL:   http://hg.openjdk.java.net/jdk8/2d/jdk/rev/dc09174469ef
User:  prr
Date:  2013-08-30 17:28:15 +0000

                                     
2013-08-30
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
============================
                                     
2002-04-25



Hardware and Software, Engineered to Work Together