Skip to main content

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
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

static private void printIt(IFigure fig){

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

if (data != null) {

Printer p = new Printer(data);
PrintOperation op = new PrintFigureOperation(p, fig);
op.setPrintMargin(new Insets(0,0,0,0));"Test"); // "Test" is the print job name
Previous Topic:property sheet : Using EMF with GEF
Next Topic:info on figure with unknown anchor(s)
Goto Forum:

Current Time: Mon Jun 18 19:37:45 GMT 2018

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

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

Back to the top