限制页面中的行数

厄默尔

我有一个表,假设有20行,我希望显示该表,以便每个页面只有5行。因此,这20行应显示在4页中。我正在使用apache FOP打印PDF。任何人都可以帮助我吗?

厄默尔

这是如何实现的。

<xsl:choose>
   <xsl:when test="position() mod 4 = 0">
      <!-- Add table rows here with property break-after-->
      <fo:table-row break-after="page">
         <fo:table-cell>
            <xsl:text>Table content here</xsl:text>
         </fo:table-cell>
     </fo:table-row>
   </xsl:when>
   <xsl:otherwise>
      <!-- Add table rows here without property break-after-->
      <fo:table-row>
         <fo:table-cell>
            <xsl:text>Table content here</xsl:text>
         </fo:table-cell>
     </fo:table-row>
   </xsl:otherwise>
</xsl:choose>

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章