使用 Antenna House 6.3 XSL 处理器,如何在行跨页时显示边框?
Posted
技术标签:
【中文标题】使用 Antenna House 6.3 XSL 处理器,如何在行跨页时显示边框?【英文标题】:With Antenna House 6.3 XSL processor, how can border's be made to appear when a row breaks across pages? 【发布时间】:2020-05-21 20:53:50 【问题描述】:我的 fo 看起来像:
<fo:table xmlns:fo="http://www.w3.org/1999/XSL/Format" border-bottom-color="black"
border-bottom-style="solid" border-bottom- border-left-color="black"
border-left-style="solid" border-left- border-right-color="black"
border-right-style="solid" border-right- border-top-color="black"
border-top-style="solid" border-top- font-size="7pt" space-after="10pt"
space-before="10pt" start-indent="inherit" >
<fo:table-body start-indent="0pt" table-layout="auto">
<fo:table-row keep-together="always">
<fo:table-cell border-after-width.conditionality="retain" border-bottom-color="black"
border-bottom-style="solid" border-bottom- border-right-color="black"
border-right-style="solid" border-right->
<fo:block end-indent="4pt" space-after="3pt" space-after.conditionality="retain"
space-before="4pt" space-before.conditionality="retain" start-indent="4pt"
>This</fo:block>
</fo:table-cell>
<fo:table-cell border-after-width.conditionality="retain" border-bottom-color="black"
border-bottom-style="solid" border-bottom->
<fo:block end-indent="4pt" space-after="3pt" space-after.conditionality="retain"
space-before="4pt" space-before.conditionality="retain" start-indent="4pt">
<fo:block background-color="#f0f0f0" end-indent="from-parent(end-indent)"
font-size="88.88888889%" keep-with-previous.within-page="always"
line- linefeed-treatment="preserve" padding="6pt"
space-after="0pt" space-before="9pt"
start-indent="from-parent(start-indent)" white-space-collapse="false"
white-space-treatment="preserve" wrap-option="wrap"
line-height-shift-adjustment="disregard-shifts" font-family="Courier New"
>That</fo:block>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
结果是行跨页时没有下边框或上边框。
显然,除非我添加更多细节,否则我无法发布。
当文档呈现并且表格有一行跨越页面时,中断的页面底部不会出现边框,中断的页面顶部也不会出现边框。
【问题讨论】:
【参考方案1】:将border-before-width.conditionality="retain"
添加到fo:table
将解决您的问题。请参阅从示例 FO 文件修改的以下示例快照。
【讨论】:
谢谢!我也在 fo:table 中添加了border-after-width.conditionality="retain"。否则,边框只会出现在页面顶部。以上是关于使用 Antenna House 6.3 XSL 处理器,如何在行跨页时显示边框?的主要内容,如果未能解决你的问题,请参考以下文章
类和 id 选择器在 Antenna House Formatter 中不起作用