Reputation: 181
I'm trying to get a 10mm space between region-before and region-body. But I'm not able to get it relativ to the size of regin-before.
Thats how the border should be. With a single-lined 'Bemerkung' it works. But as soon as it gets double- or three-lined, the body won't be bushed down, but stays at the same position, as seen here:
My layout-master-set looks like that:
<fo:layout-master-set>
<fo:simple-page-master master-name="Stueckliste"
margin="{$Innenraender}" page-height="{$SeitenhoeheA4}" page-width="{$SeitenbreiteA4}">
<fo:region-body region-name="xsl-region-body"
margin="45mm 0mm 17mm 0mm" />
<fo:region-before extent="80mm" display-align="before"
region-name="xsl-region-before" />
<fo:region-after region-name="xsl-region-after"
extent="50mm" display-align="after" margin="30mm 0mm 40mm 0mm" />
</fo:simple-page-master>
</fo:layout-master-set>
The region-before surounding:
<fo:static-content flow-name="xsl-region-before">
...
</fo:static-content>
The region-body surounding:
<fo:flow flow-name="xsl-region-body">
...
</fo:flow>
Where is the mistake?
Upvotes: 3
Views: 2554
Reputation: 8857
There is no error. In XSL FO the height of the regions is fixed. It will not expand (or contract) based on content that exceeds (or is less than) the "extent". If you need the header area to repeat on subsequent pages then you will need to do something (like you suggest like counting characters) to determine some predicted height and set that height in the XSL that produces the XSL FO. Or you could setup a set of page templates with various "extent"s and pick from those based on the character count.
If the header is not to be repeated on subsequent pages (like it was a first page or you will only have one page) then you could move some or all of the content into the body and have no header.
Upvotes: 3