File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing a file

 
Gary Kephart
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Swing app from which I want the following to happen:
1) User selects a report
2) User selects a printer from a dialog box
3) I create either an HTML String or a temp HTML file
4) I send the above to the selected printer
I took a look at the java.awt.print and javax.print packages, but neither seem to do what I want. The javax.print looks close, but I don't see any place for a user to select a printer. Any ideas?
Thanks,
Gary
 
Joel McNary
Bartender
Posts: 1824
Eclipse IDE Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the .printDialog() method of a java.awt.print.PrinterJob. That should be what you are looking for.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic