You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Trevor Keast <tk...@cssi.org> on 2008/01/04 19:42:25 UTC
Detecting a page break before it happens
Hi,
I have a large table that spans many pages. I need some way or
detecting a page break before it happens so that I can write
"continued..." at the bottom of the table.
How can I go about doing this?
Thanks in advance!
Regards,
Trevor.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Detecting a page break before it happens
Posted by Roland Neilands <rn...@pulsemining.com.au>.
Trevor,
This is something you provide contingency in XSL-FO for, not something
you need to do manually on every page.
Search the list archives for fo:marker & fo:retrieve marker & look for
same in the examples directory.
Anyone care to update the FAQ for this? I can provide better wording.
Regards,
Roland
Trevor Keast wrote:
> Hi,
>
> I have a large table that spans many pages. I need some way or
> detecting a page break before it happens so that I can write
> "continued..." at the bottom of the table.
>
> How can I go about doing this?
>
> Thanks in advance!
>
> Regards,
>
> Trevor.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
> This e-mail is solely for the use of the intended recipient and may
> contain information which is confidential or privileged. Any
> unauthorised use of its contents is prohibited. If you have received
> this e-mail in error, please notify the sender via return e-mail and
> then delete the original e-mail.
>
This e-mail is solely for the use of the intended recipient and may contain information which is confidential or privileged. Any unauthorised use of its contents is prohibited. If you have received this e-mail in error, please notify the sender via return e-mail and then delete the original e-mail.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Detecting a page break before it happens
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Trevor Keast wrote:
> I have a large table that spans many pages. I need some way or detecting
> a page break before it happens so that I can write "continued..." at the
> bottom of the table.
>
> How can I go about doing this?
You can't "detect a page break before it happens." Really, you can't.
There is a workaround using markers. The following should help you
getting started:
<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="default"
page-height="10cm" page-width="10cm">
<fo:region-body margin-top="1cm" margin-bottom="1cm"/>
<fo:region-before extent="1cm" />
<fo:region-after extent="1cm" />
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="default">
<fo:static-content flow-name="xsl-region-after">
<fo:block>
<fo:retrieve-marker
retrieve-class-name="continued"
retrieve-position="last-ending-within-page"/>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block>
Demonstratation of using markers for a page continuation
text.
</fo:block>
<fo:table table-layout="fixed" width="9cm">
<fo:table-column column-width="9cm"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued">continued...</fo:marker>Lorem
Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="solid 1pt black" padding="2pt">
<fo:block><fo:marker
marker-class-name="continued"> </fo:marker>Lorem Ipsum</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:block space-before="6pt">
Some text after the table to demonstrate that the
"continued..." text only appears if the table continues.
</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
<fo:block>Lorem Ipsum</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
Each cell except the last defines a marker with the text "contunued..."
and the last cell has an blank marker (the space suppresses the warning
you'll get in case you use an empty marker). If your table rows are
larger than just one line you'll have to fiddle with the marker
placement (at or near the end of the cell), and in some cases you
may have to tweak other things too.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org