Maybe I was just thinking too far out of the box, but I was wondering if
it's possible to create output with different pages having different
orientation.

I tried just swapping the page-height and page-width attribute values
and had a couple of issues with it.  For a PDF, if I set the first page
to portrait and the second page to landscape it was making both pages
landscape.  On getting the output directly to the printer that was
somehow selecting the wrong tray.

I've tried setting the reference-orientation value to 90.  I haven't
gotten a test that worked with portrait and landscape in the same
output, but this works well for landscape directly to the printer.  The
problem with this value is when I create a PDF and try to view it, the
pages actually show as sideways.

On sending output directly to the printer I'm actually generating a
pageable object from the FOP output and using the
javax.print.PrintService class.  I was wondering if just setting the
javax.print.attribute.standard.PresentationDirection and/or
javax.print.attribute.standard.OrientationRequested value would work
best for printing landscape, though of course this would not allow
portrait and landscape pages in the same output.

The only other way I can think of to get portrait and landscape
orientation in the same output would be to create different xml files
for each and process them separately, though of course this would
require some method of combining the output to get one PDF, and it would
break xsl code like fo:page-number-citation ref-id="last-page".

Reply via email to