Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Setting PrinterData.orientation is useless to PrintDialog(PrintDialog bug - it can't set page orientation)
Setting PrinterData.orientation is useless to PrintDialog [message #787824] Wed, 01 February 2012 02:27 Go to next message
a bc is currently offline a bcFriend
Messages: 6
Registered: February 2012
Junior Member
Hi.

Before open the PrintDialog, setting PirnterData.orientation will not be effective.

for exmaple:

PrintDialog dialog = new PrintDialog(new Shell());
// get default print data
PrinterData printerData = Printer.getDefaultPrinterData();
if (printerData != null)
{
    // set page orientation
    printerData.orientation = PrinterData.LANDSCAPE;
    dialog.setPrinterData(printerData);
}
printerData = dialog.open();


though we set the
printerData.orientation = PrinterData.LANDSCAPE
, In dialog orientaion is set to the printer's Default value.


It tested in Windows7 x64. (6.1.7601)
Re: Setting PrinterData.orientation is useless to PrintDialog [message #789377 is a reply to message #787824] Thu, 02 February 2012 23:04 Go to previous messageGo to next message
Carolyn MacLeod is currently offline Carolyn MacLeodFriend
Messages: 149
Registered: July 2009
Senior Member
Interesting. If you use:
PrinterData printerData = new PrinterData();
instead of:
PrinterData printerData = Printer.getDefaultPrinterData();
then it works correctly.
Please open a bug for this, and I will look into it when I have more time.
Thanks!
Carolyn
Re: Setting PrinterData.orientation is useless to PrintDialog [message #789484 is a reply to message #789377] Fri, 03 February 2012 03:01 Go to previous message
a bc is currently offline a bcFriend
Messages: 6
Registered: February 2012
Junior Member
Thanks Carolyn.

I submitted it as Bug 370515 - PrintDialog.setPrinterData(PrinterData) is not effective when the argument was created by Printer.getDefaultPrinterData().
Previous Topic:Browser and PDF
Next Topic:Update plan for embedded Mozilla browser?
Goto Forum:
  


Current Time: Tue Apr 23 11:55:31 GMT 2024

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

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

Back to the top