A: You can use the External Tools support in Eclipse to print files using external programs.
Just create a new Program launch config from the External Tools dialog that launches your favorite printing utility and you can pass the selected resource as a parameter.
// Take the snapshot into a display Image Point size = my Size(); Image image = new Image(display, size.x, size.y); GC gc = new GC(my Widget); Area(image, 0, 0); gc.dispose(); // Get the Image Data and create a new printer Image from it Image Data image Data = Image Data(); Image print Image = new Image(printer, image Data);.
(Remember to dispose both images when you are done with them).
As of Eclipse 3.2, Swing and AWT can be embedded in SWT on Windows, GTK and OS X.