Skip to main content



      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] Tue, 31 January 2012 21:27 Go to next message
Eclipse UserFriend
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 18:04 Go to previous messageGo to next message
Eclipse UserFriend
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] Thu, 02 February 2012 22:01 Go to previous message
Eclipse UserFriend
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: Sat Jul 05 04:20:12 EDT 2025

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

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

Back to the top