This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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

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!
Have you checked out Aspose?
subject: PageFormat and Paper A4
It's not a secret anymore!