Two Laptop Bag*
The moose likes Java in General and the fly likes PrinterJob can't detect the new default printer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "PrinterJob can Watch "PrinterJob can New topic
Author

PrinterJob can't detect the new default printer

Janfry Nice
Greenhorn

Joined: Oct 10, 2005
Posts: 7
Hi.

Under Windows XP and JDK 1.4, I use PrinterJob.getPrinterJob(); for getting the default printer.

When I changed the default printer from first printer to second printer in Windows's Setting, the PrinterJob.getPrinterJob(); still return the first printer as default printer.
And I don't want to show the Print Dialog.

I guess that this problem may be caused from the JVM will detect default printer only once when JVM started.

I obtain the same result if I use PrintServiceLookup.lookupDefaultPrintService(); It doesn�t work.

�Any ideas?

Thanks in advance.

Janfry
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: PrinterJob can't detect the new default printer
 
Similar Threads
i m new to java pls help for socket program of printer
PrinterJob doesn't remember the Printer
Printing an object
Printing Margin Issue
Java code printing junk characters in PDF