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>
I am using markers and "retrieve-table-marker" in XSL-FO to create footers in a PDF transformation.
I need a solution where a one-column table has a "clean" footer and a multi-column table has a footer with added text ("continued") before each column-break. The added text should only be applied before the page break IF the table breaks between columns.
My current code almost does this. It works well for multi-column tables, but for a one-column table the "continued" text is added even though the table does not break.
The code:
<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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,这对我有用:
我换
了
Alright, this worked for me:
I swapped
for