W3Schools

home HOME

XSLFO Tutorial
XSLFO HOME
XSLFO Intro
XSLFO Documents
XSLFO Areas
XSLFO Output
XSLFO Flow
XSLFO Pages
XSLFO Blocks
XSLFO Lists
XSLFO Tables
XSLFO & XSLT
XSLFO Software

XSLFO Reference
XSLFO Objects

Selected Reading
Web Statistics
Web Glossary
Web Hosting
Web Quality

W3Schools Forum

Helping W3Schools

XSL-FO simple-page-master Object

Back

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

 

 

 

 

 

 

 

 

 



Back




Jump to: Top of Page or HOME or Printer Friendly Printer friendly page

W3Schools provides material for training only. We do not warrant the correctness of its contents. The risk from using it lies entirely with the user. While using this site, you agree to have read and accepted our terms of use and privacy policy.

Copyright 1999-2008 by Refsnes Data. All Rights Reserved.

Validate Validate W3C-WAI level A conformance icon W3Schools was converted to XHTML in December 1999