aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Printing in landscape mode. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Printing in landscape mode." Watch "Printing in landscape mode." New topic
Author

Printing in landscape mode.

Rob Ross
Bartender

Joined: Jan 07, 2002
Posts: 2205
Is there something special I have to know/do to get my paper to print in Landscape mode?
I'm putting up a printer dialog with

In the dialog, I'm clicking on the Properties...button, then selecting the Landscape radio button.
In my print() method, I'm using PageFormat.getImageableHeight() and PageFormat.getImageableWidth() to base my drawing calculation on.
But the width and height never seem to change whether I have selected Portrait or Landscape.
So how do I tell the PrintFormat to switch to landscape mode? And why does my choice in the Print dialog get ignored?
Thanks.
[ March 21, 2002: Message edited by: Rob Ross ]

Rob
SCJP 1.4
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
The PageFormat class describes the size and orientation of a page to be printed.
Rob Ross
Bartender

Joined: Jan 07, 2002
Posts: 2205
The issue is that when you click on the Properties... button, it doesn't make any changes to the PrinterJob's PrintFormat object.
I don't know if this is a bug or an oversight.
 
Don't get me started about those stupid light bulbs.
 
subject: Printing in landscape mode.