Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » [Printing] Under what circumstances will Printer.startJob(), Printer.startPage() return false?
[Printing] Under what circumstances will Printer.startJob(), Printer.startPage() return false? [message #490943] Mon, 12 October 2009 14:26 Go to next message
Matthew Hall is currently offline Matthew HallFriend
Messages: 368
Registered: July 2009
Senior Member
In PaperClips I've always assumed that Printer.startJob() and
..startPage() would only return false under weird error condition e.g.
out of system resources or some crazy thing, so I've always reacted to
this result by throwing an exception up to the caller. The

I've had a bug report now, where if the user prints to a PDF printer and
clicks cancel then startJob() returns false. This is a totally normal
use case and I think I should just abort in response to a false return
value.

Could any of the SWT devs clarify under what circumstances these methods
would return false?

Thanks,

Matthew

[1] http://code.google.com/p/swt-paperclips/issues/detail?id=20
Re: [Printing] Under what circumstances will Printer.startJob(), Printer.startPage() return false? [message #491214 is a reply to message #490943] Tue, 13 October 2009 16:17 Go to previous message
Kevin Barnes is currently offline Kevin BarnesFriend
Messages: 174
Registered: July 2009
Senior Member
startJob() and startPage() return false when SWT was unable to start the job or the page. On windows for example we check if the return code for StartDoc and StartPage() is less than or equal to 0. If the user has clicked cancel, I would expect one of these functions would fail.

Mac has a strange "Save as PDF" option in the print dialog that allows you to Save as PDF, then cancel the print job. Is that what's going on here?
Previous Topic:[MACOSX] Error handling events on GMF diagrams
Next Topic:problem whit load image
Goto Forum:
  


Current Time: Sun Aug 25 15:51:32 GMT 2019

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

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

Back to the top