Is there any way I can set a fixed height for a block regardless of the content within it? I have a block which sometimes displays some text but sometimes it needs to be empty and keep the same height:
<xsl:choose>
<xsl:when test="$condition">
<fo:block height="30mm">
<xsl:text>TEXTTEXT</xsl:text>
</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:block height="30mm">
<xsl:text> </xsl:text>
</fo:block>
</xsl:otherwise>
</xsl:choose>
The height
attribute does not apply to fo:block
. To keep a fixed height, wrap the fo:block
in a fo:block-container
:
<fo:block-container height="30mm">
<fo:block>
<xsl:text> </xsl:text>
</fo:block>
</fo:block-container>