Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Draw2d Printing to XPS format not operational
Draw2d Printing to XPS format not operational [message #528014] Sun, 18 April 2010 18:32
Steven Punte is currently offline Steven PunteFriend
Messages: 34
Registered: July 2009
Member
With Windows 7, and I believe Vista too, Microsoft has introduced a new format as alternative to routing output to a printer called XPS: XML Paper Specification.

In Windows XP, a format called MDI was supported, and Eclipse release 3.5 works find with this, but support for this format from MS is disappearing.

This problem can be demonstrated with a small modification to the PrintExample.jave found in cvs: namely the call "PrintDialog" is added so that the printer can be selected. See below for modification.

I note that GMF does work with XPS! However, GMF uses quite a bit different code, and I wasn't able to spot exactly what is making the difference.

Should I log this into bugzilla?

Steve Punte
Test Lens



== Mod to PrintExample.java

static private void printIt(IFigure fig){

PrintDialog dialog = new PrintDialog(Display.getCurrent().getActiveShell(), SWT.NULL);
PrinterData data = dialog.open();

if (data != null) {

Printer p = new Printer(data);
PrintOperation op = new PrintFigureOperation(p, fig);
op.setPrintMargin(new Insets(0,0,0,0));
op.run("Test"); // "Test" is the print job name
p.dispose();
}
}
Previous Topic:Change icon when tool selected from palette
Next Topic:How to use a EditorPart to draw Draw2D figures on it ?
Goto Forum:
  


Current Time: Sat Nov 29 03:51:58 GMT 2014

Powered by FUDForum. Page generated in 0.01525 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software