XSL-FO 1.0强制内容以两列格式填充第一列

时间:2017-06-14 13:28:56

标签: xslt xsl-fo two-columns

我正在为一张小桌子使用两列布局。

<fo:block-container column-count="2">
    <fo:table border-bottom="solid" border-bottom-width=".5pt" 
        border-top="solid" table-layout="fixed" table-omit-header-at-break="false" 
            table-omit-footer-at-break="true" text-align="start" white-space-treatment="preserve" 
            width="4in" hyphenate="true" cols="4">
                <fo:table-column column-number="1" column-width="30%"/>
                <fo:table-column column-number="2" column-width="20%"/>
                <fo:table-column column-number="3" column-width="20%"/>
                <fo:table-column column-number="4" column-width="20%"/>
                <fo:table-header>
                    <xsl:call-template name="NI-HEADER"/>
                </fo:table-header>
            <fo:table-body>
                <xsl:call-template name="SortParts"/>
            </fo:table-body>
    </fo:table>
</fo:block-container>

这很有效,除了最后一页只有十行,它在两列之间分开。有没有办法在进入下一列之前强制最后一页填充第一列? enter image description here

1 个答案:

答案 0 :(得分:3)

以下扩展属性可以帮助您:

axf:column-fill / CSS(-ah-)column-fill

http://www.antenna.co.jp/AHF/help/v62e/ahf-ext.html#axf.column-fill

<fo:block-container axf:column-count="2">

enter image description here

<fo:block-container axf:column-count="2" axf:column-fill="auto">

enter image description here