How do I print Landscape? I tried just telling my XSL to swap the values of page-height and page-width. I'm using embedded code, passing the FOP transformed output to a ByteArrayOutputStream, and passing those bytes into pdfbox. I then get the PageFormat of the document and it has the correct width and height for landscape, but the orientation value is returning portrait. I save the output to a pdf and open it and it appears to be landscaped, but I try to print it and get a warning light on the printer asking what paper it should be printing to. Am I missing something in my FOP code or might I be missing something in the pdfbox code? I set the portrait print to 8.5" x 11" and everything works fine. I set the landscape print to 11" x 8.5" and it doesn't seem to be recognizing it correctly.