aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes AWT Printing Landscape/Portrait Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "AWT Printing Landscape/Portrait" Watch "AWT Printing Landscape/Portrait" New topic
Author

AWT Printing Landscape/Portrait

M Barr
Greenhorn

Joined: Oct 12, 2011
Posts: 1

Hello all, thanks for any help in advance.

I'm currently attempting to print from AWT with Graphics2D and a Pageable object to a print driver that converts the printout to PDF(PDF995). For everything to be formatted correctly I need to print everything in portrait, with the width and height sized according to the actual orientation. Everything works perfectly, except if I print landscape, it will stay landscape after that. It will not switch back to portrait. It will print portrait, then landscape, but not vice versus. Here's the code for generating the PageFormatObject, BBrPageData is a Printable class that contains page constraints and the data to print on the page. It should be redundant to clone the paper, then set the sizes from the class, but I was covering all my bases.



I know this isn't much to go on, but if anyone can point me in a direction to try, I'd appreciate it. I've tried every combination of setting the orientation, not setting it, reversing the constraints, etc. So fresh eyes would be great. Thanks again!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AWT Printing Landscape/Portrait
 
Similar Threads
Printing problem
LinePrinter.java
Landscape
Change the Printer Orientation??
Printing a JPanel