This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes PageFormat and Paper A4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "PageFormat and Paper A4" Watch "PageFormat and Paper A4" New topic

PageFormat and Paper A4

Ko Wey
Ranch Hand

Joined: Sep 08, 2003
Posts: 67
I am trying to print images (on A4 -paper, which is 21cm X 29.5cm.)
I do this:

and then in print

When I do the printing in "landscape", I get a 4.5 cm border between the
left sides of the paper and the image. Too much!

When I System.out.print the value pageFormat.getImageableX(), I get:


Any customer or staff of this excellent saloon that knows the correct values?
Ko Wey
Ranch Hand

Joined: Sep 08, 2003
Posts: 67
Sorry, I forgot to mention:

(the values are 1/72 of an inch
and 1 inch = 2.54cm)
which should clarify my earlier code!
I agree. Here's the link:
subject: PageFormat and Paper A4
It's not a secret anymore!