This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PageFormat and Paper A4

 
Ko Wey
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:

LANDSCAPE
26.18181818181813
PORTRAIT
39.27272727272727

Any customer or staff of this excellent saloon that knows the correct values?
 
Ko Wey
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I forgot to mention:

(the values are 1/72 of an inch
and 1 inch = 2.54cm)
which should clarify my earlier code!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic