PaperViewer linux 64 swt 3.5

3 views
Skip to first unread message

ink

unread,
Jan 28, 2010, 5:07:12 AM1/28/10
to SWT PaperClips
When you close the editor sends the job to the printer?
And I just wanted to print preview.

toolkit = new FormToolkit(parent.getDisplay());
form = toolkit.createScrolledForm(parent);
toolkit.decorateFormHeading( form.getForm() );

pp = new PrintPreview(form.getBody(), SWT.NONE);

p = createPrint(fk);
pj = new PrintJob("fk", p );
pp.setPrintJob(pj);

GridLayoutFactory.fillDefaults().numColumns(2).generateLayout(
form.getBody());

form.pack();

Matthew Hall

unread,
Jan 29, 2010, 1:01:49 AM1/29/10
to SWT PaperClips
This is a known bug, due to lack of support for canceling a print job
on linux.

Basically in order to render the print preview as an exact WYSIWYG of
the printer output, we have to start a dummy print job. Since
Printer.cancelJob() is not implemented on Linux, I have to call
Printer.endJob() which issues a page feed.

See http://bugs.eclipse.org/291862

Matthew

ink

unread,
Jan 29, 2010, 3:29:37 AM1/29/10
to SWT PaperClips
thanks for your prompt response
Reply all
Reply to author
Forward
0 new messages