File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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