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: Langerjo.de.ibm.com

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 = pd.open();
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???
printer.endPage();
printer.endJob();
gc.dispose();
}
}
}


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: Thu Apr 25 23:48:59 GMT 2024

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

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

Back to the top