Skip to main content



      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 10:26 Go to next message
Eclipse UserFriend
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 12:17 Go to previous message
Eclipse UserFriend
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: Tue Jul 08 21:11:42 EDT 2025

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

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

Back to the top