• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Page Orientation Problem with Image getting cut off

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am currently drawing a jpeg to an 8.5 x 11 page. Problem is that the right hand size of the image doesn't appear(I beleive its due to page borders). To solve this, I tried setting the page orientation to Landscape before drawing. Page is landscape, but even know there is plenty of room, the same part of the image is cut off. Here is the simple code:
pageFormat.setOrientation(0); //set to landscape
Graphics2D g2d = (Graphics2D)g;
g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
g2d.drawImage(bufferedImage,0,0,printSizeX,printSizeY,null);

Am I doing something wrong? The width of the image is 554 pixels, if I make it smaller, the entire image appears. I need the full size of 554 pixels though.
Thanks!
 
reply
    Bookmark Topic Watch Topic
  • New Topic