How to Print a File using Java?
1 posts in topic
Flat View  Flat View

Posted By:   Manish_Marathe
Posted On:   Wednesday, August 7, 2002 01:12 AM

Is there a way to print the file,which is on the disk, using Java? I believe with java.awt.print.PrinterJob, you can only print the Components or whatever you draw on the graphics object!

Thanks in Advance!

Re: How to Print a File using Java?

Posted By:   Prashant_Mirajkar  
Posted On:   Friday, August 9, 2002 07:42 PM

Along with PrinterJob, one needs to use an implementation of an interface Printable to print whatever one wants.

The implementation of Printable is the painter of the page to be painted by the printing device.

There are some examples already posted in Swing FAQ. Also refer to http://java.sun.com/printing.
About | Sitemap | Contact