XML technologies / XSL-FO / Reference / Attributes in XSL-FO / page-height

(Excerpt from "XSL-FO ― Die Referenz" by Manuel Montero Pineda & Steffen Herkert, 2016, dpunkt.verlag)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Recommendation section: 7.27.13

Category: 7.27 Pagination and Layout Properties

Description

A page master’s page size is specified in <fo:simple-page-master> using page-width and page-height. The page-width attribute sets the width, and page-height sets the height.

Values

auto

This value gives the height of the formatter’s default page size.

indefinite

The page height is indefinite. No known formatter supports this value.

Length

A length consisting of a number and a unit. Common units are mm, pt, px, cm and pc.

Inherited:

yes

Default value: auto

XSL-FO version: 1.0

Allowed in:

<fo:simple-page-master>

This element defines individual pages. Desired values can be assigned to each of a page’s five regions.

Support:

Conformance level

Antenna House

FOP

RenderX XEP

Altsoft XML2PDF

Compart DocBridge

Basic

Y

P

Y

Y

Y

XSL-FO example:

<fo:root font-family="Arial" font-size="10pt" line-height="1.2em" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:cpfo="http://www.compart.net/xmlns/cpfo" xmlns:svg="http://www.w3.org/2000/svg" xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions">
<fo:layout-master-set>
<fo:simple-page-master master-name="Inhalt-Seiten.auto" margin="0mm 0mm 0mm
                      0mm" page-height="auto" page-width="auto">
<fo:region-body margin="10mm 15mm 5mm
                        25mm"/>
<fo:region-before extent="5mm" region-name="auto.before"/>
<fo:region-start extent="5mm" region-name="auto.start" reference-orientation="90"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="Inhalt-Seiten" margin="0mm 0mm 0mm
                      0mm" page-height="210mm" page-width="297mm">
<fo:region-body margin="10mm 15mm 5mm
                        25mm"/>
<fo:region-before extent="5mm" region-name="quer.before"/>
<fo:region-start extent="5mm" region-name="quer.start" reference-orientation="-90"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="Inhalt-Seiten.master">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="Inhalt-Seiten.auto" page-position="first"/>
<fo:conditional-page-master-reference master-reference="Inhalt-Seiten" page-position="any"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="Inhalt-Seiten.master" font-size="10pt">
<fo:static-content flow-name="quer.before">
<fo:block margin-top="2mm" text-align="center">
 Seitenbreite: 297mm 
</fo:block>
</fo:static-content>
<fo:static-content flow-name="quer.start">
<fo:block-container reference-orientation="90" text-align="center">
<fo:block margin-top="2mm" margin-right="90mm" text-align="center">
 Seitenhöhe: 210mm 
</fo:block>
</fo:block-container>
</fo:static-content>
<fo:static-content flow-name="auto.before">
<fo:block margin-top="2mm" text-align="center">
 Seitenbreite: 210mm (auto) 
</fo:block>
</fo:static-content>
<fo:static-content flow-name="auto.start">
<fo:block-container reference-orientation="90" text-align="center">
<fo:block margin-top="2mm" margin-right="120mm" text-align="center">
 Seitenhöhe: 297mm (auto) 
</fo:block>
</fo:block-container>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block page-break-after="always"/>
<fo:block/>
</fo:flow>
</fo:page-sequence>
</fo:root>

Download the examples

In the output:

Page 2

Excerpt from the W3C Recommendation:

More information online about

Introduction: "Page layout">

Practical example: "Page masters and simple page sequence masters">

Practical example: "Complex page sequence masters">

Practical example: "Multi-column pages with column rules">

Rendering of the property in the XSL-FO reference

back to top