XSL-FO Tutorials - Herong's Tutorial Examples - v2.25, by Herong Yang
region-before and region-after Sub Elements
This section describes optional region-before and region-after sub elements of the simple-page-master page layout. They are used to declare header and footer areas on the page in most cases.
"simple-page-master" page layout has 5 regions: region-body, region-before, region-after, region-start, and region-end. We have reviewed the "region-body" region in the previous section. Now we will review the next two regions: "region-before" and "region-after".
What are "region-before" and "region-after"? "region-before" and "region-after" are optional sub elements of the XSL-FO page layout declaration element "simple-page-master" to declare special regions at both ends of the Block Progression Direction on the page.
For example, if "simple-page-master" is declared with writing-mode="lr-tb", "region-before" and "region-after" regions will be located at the top edge and the bottom edge of the page, because the Block Progression Direction runs from top to bottom of the page.
"region-before" and "region-after" share the following attributes:
Note that border="..." and padding="..." should not be used, because only 0 width is allows. In other words, "region-before" and "region-before" will have no border and no padding.
Note that margin="..." should not be used, because is not supported in "region-before" and "region-after" elements.
Here is an example <region-before ...> element with a given name, extent and background color:
<fo:region-before region-name="my_header" background-color="#ffeeee" extent="0.5in" precedence="false" reference-orientation="0" writing-mode="lr-tb"/>
Table of Contents
Apache™ FOP (Formatting Objects Processor)
XSL-FO Document Basics and Examples
simple-page-master - Simple Page Layout
simple-page-master Attributes and Sub Elements
simple-page-master/region-body Sub Element
►region-before and region-after Sub Elements
region-start and region-end Sub Elements
"Body" Region Margin and "Side" Region Extent
Precedence of Side Region Corners
Page Layout and Page Sequence Mapping
What Is "page-sequence-master"
Layout Sequence Example - Cover and Content
Wheat Is "repeatable-page-master-alternatives"?
Layout Sequence Example - Odd and Even Pages
Block-Level Formatting Objects
Inline-Level Formatting Objects
Including Graphics in XSL-FO document
Floating Blocks - "float" and "footnote"
Hyperlinks, Table of Contents and Indexes
Headers and Footers using "static-content"
Font Attributes and Font Families
Apache FOP Font Configurations