Spanning text on multiple columns is possible using the xf:continuous-sequence extension.
When this attribute is applied and set to "true", all consecutive page sequences with this attribute declared are added to the first page sequence as a continuous flow.
First, the user must create different page layouts and assign them to page sequences. Then the xf:continuous-sequence attribute must be applied to the desired page sequence and its value set to "true".
Note:
· | A page-sequence with xf:continuous-sequence applied to, will preserve its attributes (background, column count etc.). As a result, text with different column count/tables etc. can be displayed on the same page, without any of its attributes being modified. |
In the example below, three page sequences have been declared:
· | Sequence1 - with column-count="4" |
· | Sequence2 - with column-count="3" |
· | Sequence3 - the column-count is not mentioned and the default value will be applied to the sequence, that is, "1". This page sequence contains a table with three rows and four columns. |
Example of usage:
<?xml version="1.0" encoding="utf-8" ?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xf="http://www.ecrion.com/xf/1.0" xmlns:xc="http://www.ecrion.com/2008/xc" xmlns:svg="http://www.w3.org/2000/svg" font-family="Times" font-size="12pt">
<fo:layout-master-set>
<fo:simple-page-master master-name="Sequence1" page-width="8.5in" page-height="7in">
<fo:region-body region-name="xsl-region-body" column-count="4" margin="0.7in"/>
<fo:region-end region-name="xsl-region-end" extent="0.7in"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="Sequence2" page-width="8.5in" page-height="7in">
<fo:region-body region-name="xsl-region-body" column-count="3" margin="0.7in"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="Sequence3" page-width="8.5in" page-height="7in">
<fo:region-body region-name="xsl-region-body" margin="0.7in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="Sequence1" xf:continuous-sequence="true">
<fo:flow flow-name="xsl-region-body">
<fo:block background-color="rgb(255,204,153)">text here...text here</fo:block>
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="Sequence2" xf:continuous-sequence="true">
<fo:flow flow-name="xsl-region-body">
<fo:block background-color="rgb(51,204,204)">text here...text here</fo:block>
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="Sequence3" xf:continuous-sequence="true">
<fo:flow flow-name="xsl-region-body">
<fo:block background-color="rgb(204,153,255)">
<fo:table border-collapse="collapse" width="100%" table-layout="fixed">
<fo:table-column column-width="25.000" column-number="1"/>
<fo:table-column column-width="25.000" column-number="2"/>
<fo:table-column column-width="25.000" column-number="3"/>
<fo:table-column column-width="25.000" column-number="4"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell border="1pt solid black" padding="2pt">
<fo:block>ID</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black" padding="2pt">
<fo:block>Product</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black" padding="2pt">
<fo:block>Delivered</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black" padding="2pt">
<fo:block>Client</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="1pt solid black" padding="2pt">
<fo:block>1</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black" padding="2pt">
<fo:block>Product 1</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black" padding="2pt">
<fo:block>07/25/2012</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black" padding="2pt">
<fo:block>Client A</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell border="1pt solid black" padding="2pt">
<fo:block>2</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black" padding="2pt">
<fo:block>Product 1</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black" padding="2pt">
<fo:block>07/26/2012</fo:block>
</fo:table-cell>
<fo:table-cell border="1pt solid black" padding="2pt">
<fo:block>Client B</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
Output: