问题描述
我们正在使用 xsl-fo 创建 PDF。
我尝试使用
<xsl:attribute-set name="myBorder">
<xsl:attribute name="border-bottom">0.0254cm solid black</xsl:attribute>
<xsl:attribute name="border-right">0.0254cm solid black</xsl:attribute>
<xsl:attribute name="border-left">0.0254cm solid black</xsl:attribute>
<xsl:attribute name="border-top">0.0254cm solid black</xsl:attribute>
</xsl:attribute-set>
<fo:block xsl:use-attribute-sets="myBorder" height="225mm" width="195.0mm">
它希望它是这样的:
如何产生所需的输出?
解决方法
在 fo:region-body
上指定边框(请参阅 https://www.w3.org/TR/xsl11/#fo_region-body),而不是在包含文本的 fo:block
等上指定边框。