Jason,

I have done this for tables that need either landscape or portrait
orientation based on the width of the table.

I setup two simple-page-masters:

                        <fo:layout-master-set>
                                <fo:simple-page-master
master-name="landscape" margin="1cm 1cm 1cm 1cm" page-height="8.5in"
page-width="11in">
                                        <fo:region-body/>
                                        <fo:region-after extent=".5cm"
region-name="footer"/>
                                </fo:simple-page-master>
                                <fo:simple-page-master
master-name="portrait" margin="1cm 1cm 1cm 1cm" page-height="11in"
page-width="8.5in">
                                        <fo:region-body/>
                                        <fo:region-after extent=".5cm"
region-name="footer"/>
                                </fo:simple-page-master>
                        </fo:layout-master-set>


Then I make my decision like this:

                                <fo:page-sequence>
                                        <xsl:attribute
name="master-reference" select="if ($max-pocket gt 6) then 'landscape' else
'portrait' "/>

Perhaps you can adapt this to your use?

Rick

-----Original Message-----
From: Jason Cowley [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 22, 2006 5:34 AM
To: fop-users@xmlgraphics.apache.org
Subject: Changing Orientation on Page Break

Hello all,

I am working on an application that dynamically generates XSL:FO xml,  
from XHTML forms to produce PDF output. On certain large tables  
within a document I would like to change the page orientation from  
portrait to landscape, and then revert back to portrait after the  
table for subsequent pages. So ideally I would like to change the  
page orientation after a page break. Is this possible, and if so can  
someone be so kind as to provide an example?

I use the following to force a page break:

<fo:block break-before="page"/>

I have tried setting the reference-orientation attribute to 90 on the  
block-container surrounding the table like so:

<fo:block-container reference-orientation="0">
   <fo:table>
     ...
   </fo:table>
</fo:block-container>

but this results the table text being rotated, except it is squashed  
into a narrow block so all of the text overlaps and no table borders  
are drawn.

Any help is greatly appreciated.

Thanks,

Jason


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to