A crude line counting example:

<xsl:for-each select="details/data/reportrow[position() mod $rowCount = 1]">
        <fo:page-sequence master-reference="generic" language="en" country="us">
                <fo:static-content flow-name="xsl-region-before">
                        <xsl:call-template name = "pageHeader"/>
                </fo:static-content>

                <fo:static-content flow-name="xsl-region-after">
                        <xsl:call-template name = "copyright"/>
                </fo:static-content>

                <fo:flow flow-name="xsl-region-body">
                        <fo:table table-layout="fixed" width="100%">
                        ...
                        </fo:table>
                </fo:flow>
        </fo:page-sequence>
</xsl:for-each>

Be aware, this results in some strange page breaking since table rows may wrap and be "taller" than you would expect.  It does help with memory consumption so even though it is ugly, my users still like it for "quick and dirty" reporting.

-Lou

Jeremias Maerki <[EMAIL PROTECTED]> wrote on 03/29/2006 15:05:13:

> Basically, this means that you have to try to design your stylesheet in
> a way, that you can produce multiple page-sequences (ATM, your
> stylesheet produces one single page-sequence). The reason for that: FOP
> can release memory after a page-sequence is processed, especially if
> there are no forward references. So if you can find logical points in
> your report where you can force a new page, you can start a new
> page-sequence. Sometimes it means that you have to do some crude line
> counting to guess at FOP's line break decisions, sometimes this is not
> necessary which makes the whole job easier.
>
> HTH
>
> On 29.03.2006 21:52:28 njain wrote:
> > Page-Sequence optimization! Well I am not really sure how to do that. I
> > have tried to reduce the number of tables and font specifications in
> > table-cells. But if you could throw a pointer as to how I can achieve the
> > page-sequence optimization, that'd be really helpful.
> > I have pasted the xsl file here. (It's big one though). Let me know if you
> > can deduce something from this which could help me in doing the
> > optimization.
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

Reply via email to