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!