Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PrintDialog for selecting the printers

 
Sumana Reddy
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic