Draw2d Printing to XPS format not operational [message #528014] |
Sun, 18 April 2010 18:32 |
Steven Punte 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();
}
}
|
|
|
Powered by
FUDForum. Page generated in 0.01827 seconds