Contents | < Lists | Footnotes >
Every page has the following regions:
- fo:region-body which holds the main page content, that is, the content of fo:flow
- fo:region-before, used to display headers
- fo:region-after, used to display footers
- fo:region-start and fo:region-end, used to display side regions
Of all regions, fo:region-body can have multiple columns:
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="all-pages" page-width="5in"
page-height="5in">
<fo:region-body region-name="Content" margin="0.7in" padding="6pt"
column-gap="0.25in" column-count="2" />
<fo:region-before region-name="Header" extent="0.7in" padding="6pt"
display-align="after" background-color="red"/>
<fo:region-after region-name="Footer" extent="0.7in" padding="6pt"
display-align="before" background-color="blue"
precedence="true" />
<fo:region-start region-name="LeftSide" extent="0.7in" padding="6pt"
background-color="green" display-align="after"
reference-orientation="90" />
<fo:region-end region-name="RightSide" extent="0.7in" padding="6pt"
background-color="yellow" display-align="after"
reference-orientation="-90"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="default-sequence">
<fo:repeatable-page-master-reference master-reference="all-pages" />
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="default-sequence">
<fo:static-content flow-name="Header">
<fo:block>...</fo:block>
</fo:static-content>
<fo:static-content flow-name="Footer">
<fo:block>...</fo:block>
</fo:static-content>
<fo:static-content flow-name="LeftSide">
<fo:block>...</fo:block>
</fo:static-content>
<fo:static-content flow-name="RightSide">
<fo:block>...</fo:block>
</fo:static-content>
<fo:flow flow-name="Content">
<fo:block>
The body region's content flows in two columns.
The body region's content flows in two columns.
...
</fo:block>
<fo:block span="all" border="1pt solid red">
This block has "span" attribute set to all, which will make
it span all the columns in the page. Note that span attribute can
be set only for those blocks with a fo:flow as the direct parent.
</fo:block>
...
</fo:flow>
</fo:page-sequence>
</fo:root>
![]() | For the complete source code for this code example see "Tutorial/Regions.fo" located under XML Documents Samples/Tutorial folder. |
The rendering result is displayed in the next figure.

Figure 1
Every sequence of pages generated by the XSL-FO engine can have one or more page layouts associated with it:
a) The simples scenario: only one page layout for the whole document. All documents described so far belong to this category.
c) Different page layouts for the first and subsequent pages, for the case when you want a cover page formatted differently than the rest of the pages.
b) Different page layouts for even and odd pages, as it happens with most printed books, where the inside margin of a page is slightly larger than the outside margin, to allow binding.
Contents | < Lists | Footnotes >