XSL-FO simple-page-master Object

From http://www.w3schools.com (Copyright Refsnes Data)

# XSL-FO simple-page-master Object

## Definition and Usage

The <fo:simple-page-master> object defines the size and shape of a page. There will be one named simple-page-master for each page layout.

A page can contain up to five regions: region-body, region-before, region-after, region-start, and region-end.

The <fo:simple-page-master> will be referenced from a <fo:page-sequence-master> object or from a <fo:page-sequence> object.

## Syntax

    <fo:simple-page-master>
      <!--
    	Contents:(region-body,region-before?,
    	region-after?,region-start?,region-end?)
      -->
    </fo:simple-page-master>

## Properties

Property
end-indent
margin-bottom
margin-left
margin-right
margin-top
master-name
page-height
page-width
reference-orientation
space-after
space-before
start-indent
writing-mode

### Example 1

XSL-FO documents have a structure like this:

    <?xml version="1.0" encoding="ISO-8859-1"?>

    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

    <fo:layout-master-set>
      <fo:simple-page-master master-name="A4">
        <!-- Page template goes here -->
      </fo:simple-page-master>
    </fo:layout-master-set>

    <fo:page-sequence master-reference="A4">
      <!-- Page content goes here -->
    </fo:page-sequence>

    </fo:root>

### Example 2

A "real" XSL-FO example:

    <?xml version="1.0" encoding="ISO-8859-1"?>

    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

    <fo:layout-master-set>
    <fo:simple-page-master master-name="A4">
    </fo:simple-page-master>
    </fo:layout-master-set>

    <fo:page-sequence master-reference="A4">
    <fo:flow flow-name="xsl-region-body">
    <fo:block>Hello W3Schools</fo:block>
    </fo:flow>
    </fo:page-sequence>

    </fo:root>

The output from the code above would be something like this:

Hello W3Schools

From http://www.w3schools.com (Copyright Refsnes Data)