axf:layer

(Auszug aus "XSL-FO ― Die Referenz" von 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

Category Layer in PDF Output >> axf:layer-settings / CSS (-ah-)layer-settings

Specifies to which layer the area is arranged. V6.3[no-LT]

Value:none | <layer-name>
Initial:none
Applies to:all elements
Inherited:yes
Percentages:N/A

Values have the following meanings.

noneThe area is arranged to no layer.
<layer-name>The area is arranged to the layer with the name specified by <layer-settings>.

This property is not available with AH Formatter V6.3 Lite.

XSL-FO sample:

<fo:root xml:lang="en" axf:layer-settings="layer1,layer2,layer3,layer4 view off,layer5 view on print off,layer6,layer7,layer8 view on lang en locked on" 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">

Antenna House, Inc.

Layer in PDF output

PDF layer can be specified by axf:layer-settings and axf:layer. Specify the layer setting like axf:layer-settings="layer1,layer2" in fo:root and specifies in which layer the area is specified like axf:layer="layer1". The features which can be specified are view, print, export, locked and lang. The initial state of on/off can be specified to view, print and export. locked locks a layer. lang specifies a language. The layer settings are effective only with PDF 1.5 or later. In this sample, <axf:document-info name="pagemode" value="UseOC" /> is specified so that the layer pannel can be shown when opening the document.

Example of layer setting

Example of defining layre1, layre2, layre3 and arranging the layer to fo:block-container.

layer1

layer2

layer3

Example of defining layer4 by [layer4 view off] and hiding the layer as default.

layer4

Example of defining layer5 by [layer5 view on print off] and showing the layer but hiding it when printing.

layer5

Example of defining layer6, defining layer7 to the arranged fo:block in fo:block-container and arranging it. If layer6 is hidden, then layer7 can also be hidden.

layer6 (fo:block-container)

layer7 (fo:block)

Example of defining layer8 by [layer8 view on lang en locked on], speciying Englsin as the language, specifying the layer to be locked.

layer8

Download der Beispiele

Output:

Tipp der data2type-Redaktion:
Zum Thema XSL-FO bieten wir auch folgende Schulungen zur Vertiefung und professionellen Fortbildung an: