微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

xml – XSL FO继续/运行表格,页脚中的标记

我在XSL-FO中使用标记和“检索表标记”来创建PDF转换中的页脚.

我需要一个解决方案,其中单列表具有“干净”页脚,并且多列表具有在每个列中断之前添加文本(“续”)的页脚.添加的文本只应在分页之前应用,如果表在列之间中断.

我目前的代码差不多这样做了.它适用于多列表,但对于单列表,即使表不中断,也会添加“续”文本.

代码

<fo:table-body>
    <fo:table-row>
      <fo:table-cell>
        <fo:block>
          <fo:marker marker-class-name="footer-continued">(continued)</fo:marker>
        </fo:block>
        <fo:block>
          <xsl:text>Contents</xsl:text>
        </fo:block>
        <fo:block>
          <fo:marker marker-class-name="footer-continued"></fo:marker>
        </fo:block>
      </fo:table-cell>
    </fo:table-row>
  </fo:table-body>

  <fo:table-footer>
    <fo:table-row>
      <fo:table-cell>
        <fo:block>
          <fo:retrieve-table-marker retrieve-class-name="footer-continued" 
                                    retrieve-position="first-including-carryover"
                                    retrieve-boundary-within-table="table"/>
        </fo:block>
      </fo:table-cell>
    </fo:table-row>
  </fo:table-footer>

解决方法

好吧,这对我有用:

我交换了

retrieve-position="first-including-carryover"

对于

retrieve-position-within-table="last-ending-within-page"

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。