Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing in landscape mode.

 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The PageFormat class describes the size and orientation of a page to be printed.
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic