【问题标题】:Multi page pdf using fop-one page for each person tag多页 pdf 为每个人标签使用 fop-one 页
【发布时间】:2018-04-25 10:01:04
【问题描述】:

我需要使用 fop 将使用 xsl-fo 模板的 xml 数据转换为 pdf。 我的 XML 数据看起来像。

<resultset>
<person>
</person>
<person>
</person>
<person>
</person>
</resultset>

每个人员标签都需要进入 pdf 中的单独页面。能 有人请用示例 xsl-fo 模板指导我。

【问题讨论】:

    标签: xml pdf xsl-fo


    【解决方案1】:

    两种选择:

    【讨论】:

      【解决方案2】:

      这将帮助您入门,具体取决于人员标签中的信息。

      <xsl:template match="person">
          <fo:block page-break-before="always">
               process the contents of the person tag here
          </fo:block>
      </xsl:template>
      

      一些背景资料:
      XSLT
      XSL-FO
      XSL-FO 2

      【讨论】:

      • 我需要在我的 xsl 中使用 foreach 循环吗?
      • 没有。每次处理器遇到 节点时都会调用模板匹配。
      猜你喜欢
      • 2020-03-21
      • 1970-01-01
      • 2023-03-11
      • 2013-06-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-16
      • 2021-12-19
      相关资源
      最近更新 更多