XSL-FO Tutorials - Herong's Tutorial Examples
∟Page Layout Masters
∟simple-page-master Attributes and Sub Elements
This section describes attributes and sub elements of simple-page-master: master-name is the only required attribute and region-body is the only required sub element.
"simple-page-master" has the following attributes and sub elements:
- master-name="..." -
Required attribute to specify the name for this layout.
- margin-*="..." -
Optional attributes to specify the margin on the 4 edges of the page.
Default is margin="0pt".
- page-height="...", page-width="..." -
Optional attributes to specify the size of the page.
Default is page-height="11.00in" and page-width="8.26in".
- reference-orientation="..." -
Optional attribute to specify the orientation of the page
using the counter-clockwise rotation angle.
Possible values are 0, 90, 180, 270, -90, -180 and -270.
Default is reference-orientation="0".
- writing-mode="..." -
Optional attribute to specify the writing mode
as one of lr-tb (lr), rl-tb (rl), tb-rl (tb), tb-lr, bt-lr, bt-rl, lr-bt, rl-bt, lr-alternating-rl-bt, lr-alternating-
rl-tb, lr-inverting-rl-bt, lr-inverting-rl-tb, tb-lr-in-lr-pairs, lr, rl, tb.
Default is writing-mode="lr-tb".
- <region-body ...> - Required sub element to specify the
"body" region.
- <region-before ...> - Optional sub element to specify the
"before" region. It must appear after "region-body" sub element.
- <region-after ...> - Optional sub element to specify the
"after" region. It must appear after "region-before" sub element,
if "region-before" sub element is used.
- <region-start ...> - Optional sub element to specify the
"start" region. It must appear after "region-after" sub element,
if "region-after" sub element is used.
- <region-end ...> - Optional sub element to specify the
"end region. It must appear after "region-start" sub element,
if "region-start" sub element is used.
Here is an example <simple-page-master ...> element with
5 default regions:
<fo:simple-page-master master-name="my_page" margin="0.5in"
page-height="11in" page-width="8.5in"
reference-orientation="0" writing-mode="lr-tb">
<fo:region-body/>
<fo:region-before/>
<fo:region-after/>
<fo:region-start/>
<fo:region-end/>
</fo:simple-page-master>
Table of Contents
About This Book
Introduction of XSL-FO
Apache™ FOP (Formatting Objects Processor)
RenderX XEP as an XSL-FO Tool
Introduction of Area Model
XSL-FO Document Basics and Examples
►Page Layout Masters
Layout Declarations
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
Table of Rows and Columns
List, Item, Label, and Body
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
RenderX XEP Font Configurations
Converting HTML to PDF
References
Full Version in PDF/ePUB