Technologies XML / XSL-FO / Référence / Extensions XSL de Compart / Attributs / page-number-offset

(Extrait de « XSL-FO ― Die Referenz » de 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

Catégorie : Erweiterte Propriétés des éléments FO - cpfo:page-number-offset

Description

Cet attribut augmente ou diminue le numéro de page de la valeur x.

Commentaire :

Les valeurs négatives sont autorisées.

Valeur :

number

Valeur initiale :

0

Hérité :

no

Exemple XSL-FO :

<fo:root font-size="12pt" 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 margin="1cm" page-width="21cm" page-height="29.7cm" master-name="DinA4">
<fo:region-body region-name="xsl-region-body" margin-top="2cm" border=".1pt solid gray"/>
<fo:region-before region-name="xsl-region-before" extent="1cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="DinA4">
<fo:static-content flow-name="xsl-region-before">
<fo:block text-align="right">
Page: 
<fo:page-number/>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block>
Example how to add a page number offset
</fo:block>
<fo:block>
The current page number is 
<fo:page-number/>
. 
</fo:block>
<fo:block>
The current page number with a page-number-offset of 5 is: 
<fo:page-number cpfo:page-number-offset="5"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>

Télécharger les exemples

Dans la sortie :

Page 2

Page 3

haut de page