This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes PrintDialog for selecting the printers 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 "PrintDialog for selecting the printers" Watch "PrintDialog for selecting the printers" New topic
Author

PrintDialog for selecting the printers

Sumana Reddy
Greenhorn

Joined: Oct 28, 2000
Posts: 14
I am a novice to Java Printing API.After spending sometime on Printing API, I came to know that we can pop up printDialog for printer selection
using either
PrinterJob.getPrinterJob().printDialog()
or
ServiceUI.printDialog(gc, x ,y, printServices, defaultService, flavour)
Both the above PrintDialog boxs display the list of all available printers on your computer
I want to restrict these printers list to only certain printers.This is beacuse we restrict our users to print only on certified printers.So in the printDialog box, I want to list only those certified printers that are installed on their computer
I don't use Java printing API for actual printing.I use Java Printing API only for poping up the printDialog for printer selection and get the user selected printer info.I then pass the selected printer info to another application that takes care of printing to the specified printer
How can I acheive this?
Can you please tell me if there are any good tutorials, books or sample progrmas on java printing
I appreciate your valuable time and help
Thanks
Sumana
Bhagya Tangutur
Ranch Hand

Joined: Oct 21, 2002
Posts: 88
sumana,
i guess this book may help you a lot in understanding swings(the link opens chapter on printing).i hope it helps
http://manning.com/sbe/files/uts2/Chapter22html/Chapter22.htm


Sun Certified Java Programmer
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: PrintDialog for selecting the printers
 
Similar Threads
Printing on PC / Network Printer
JAVA Printing Help
can we send Prints to remote printer using Java
Mobile & Printer,Bluetooth communication
Printing in Java using printDialog