Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to print a formpage?
How to print a formpage? [message #460459] Sun, 28 August 2005 13:12
Eclipse UserFriend
Originally posted by:

Hi @ all,

am i stupid but i don't know how to print a simple formpage. I
implmented a printing action. but I don't know how to paint the widgets
with the gc object. How can I print SWT widgets?

My code so far:

PrintDialog pd = new PrintDialog(LowSummaryPage.this.getSite().getShell());
PrinterData printerData =;
if (printerData != null) {
Printer printer = new Printer(printerData);
if (printer.startJob("SWT Printing Snippet")) {
if (printer.startPage()) {
GC gc = new GC(printer);

//What to do here???

I hope anyone can help. I don't find any resources how to print some
widgets diplayed on my page, only how to draw text or rectangles:(((

Thanks, Johannes
Previous Topic:How to get the size of a composite
Next Topic:Would URLTransfer solve my problem?
Goto Forum:

Current Time: Sat Apr 17 07:30:29 GMT 2021

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

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

Back to the top