axf:layer-settings
(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
Defines layers. V6.3[no-LT]
Value: | none | <layer-setting> [, <layer-setting>]* |
Initial: | none |
Applies to: | root element |
Inherited: | no |
Percentages: | N/A |
Values have the following meanings.
none | No definition. | ||||||
<layer-setting> | <layer-setting> has the following
syntax:
|
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. |
|
|
||
|
</fo:block> |
|
|
||
|
||
|
||
|
||
|
Layer in PDF output |
|
|
</fo:block> |
|
|
</fo:block> |
|
|
||
|
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. |
|
|
</fo:block> |
|
|
||
|
Example of layer setting |
|
|
</fo:block> |
|
|
<fo:block> |
|
|
Example of defining layre1, layre2, layre3 and arranging the layer to fo:block-container. |
|
|
</fo:block> |
|
|
||
|
||
|
<fo:block> |
|
|
layer1 |
|
|
</fo:block> |
|
|
||
|
||
|
<fo:block> |
|
|
layer2 |
|
|
</fo:block> |
|
|
||
|
||
|
<fo:block> |
|
|
layer3 |
|
|
</fo:block> |
|
|
||
|
</fo:block> |
|
|
<fo:block> |
|
|
Example of defining layer4 by [layer4 view off] and hiding the layer as default. |
|
|
</fo:block> |
|
|
||
|
||
|
<fo:block> |
|
|
layer4 |
|
|
</fo:block> |
|
|
||
|
</fo:block> |
|
|
||
|
Example of defining layer5 by [layer5 view on print off] and showing the layer but hiding it when printing. |
|
|
</fo:block> |
|
|
||
|
||
|
<fo:block> |
|
|
layer5 |
|
|
</fo:block> |
|
|
||
|
</fo:block> |
|
|
||
|
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. |
|
|
</fo:block> |
|
|
||
|
||
|
<fo:block> |
|
|
layer6 (fo:block-container) |
|
|
</fo:block> |
|
|
||
|
layer7 (fo:block) |
|
|
</fo:block> |
|
|
||
|
</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. |
|
|
</fo:block> |
|
|
||
|
||
|
<fo:block> |
|
|
layer8 |
|
|
</fo:block> |
|
|
||
|
</fo:block> |
|
|
</fo:flow> |
|
|
||
|
</fo:root> |
Output:
Tipp der data2type-Redaktion: Zum Thema XSL-FO bieten wir auch folgende Schulungen zur Vertiefung und professionellen Fortbildung an: |