2017-09-05 74 views
2

我想要减少fo:table中行之间的行间距。我尝试使用顶部,底部的每一行和空格 - 之前和空格 - 之后在fo:block并没有效果。如何在生成PDF时删除/减少fo:table中表格行之间的默认间距

<xsl:template match="region1"> 
 
    \t <fo:static-content flow-name="xsl-region-before" > 
 
\t \t <fo:table table-layout="fixed" width="100%"> 
 
\t \t \t <fo:table-column column-width="100%"/> 
 
\t \t \t <!-- <fo:table-column column-width="20%"/> --> 
 
\t \t \t <fo:table-body> 
 
\t \t \t \t <fo:table-row><fo:table-cell><fo:block font-family="Courier" font-style="normal" font-weight="bold" white-space="pre" font-size="12pt"><xsl:value-of select="lines[1]/line"/></fo:block></fo:table-cell></fo:table-row> 
 
\t \t \t \t <fo:table-row><fo:table-cell><fo:block font-family="Courier" font-style="normal" font-weight="bold" white-space="pre" font-size="12pt"><xsl:value-of select="lines[2]/line"/></fo:block></fo:table-cell></fo:table-row> 
 
\t \t \t \t <fo:table-row><fo:table-cell><fo:block font-family="Courier" font-style="normal" font-weight="bold" white-space="pre" font-size="12pt"><xsl:value-of select="lines[3]/line"/></fo:block></fo:table-cell></fo:table-row> 
 
\t \t \t \t <fo:table-row><fo:table-cell><fo:block font-family="Courier" font-style="normal" font-weight="bold" white-space="pre" font-size="12pt"><xsl:value-of select="lines[4]/line"/></fo:block></fo:table-cell></fo:table-row> 
 
\t \t \t \t <fo:table-row><fo:table-cell><fo:block font-family="Courier" font-style="normal" font-weight="bold" white-space="pre" font-size="12pt"><xsl:value-of select="lines[5]/line"/></fo:block></fo:table-cell></fo:table-row> 
 
\t \t \t </fo:table-body> 
 
\t \t </fo:table> 
 
    </fo:static-content> 
 
</xsl:template>

什么,我得到的是:enter image description here

什么是预期的是: enter image description here

回答

1

默认的行高度是全球领先的可能是字体大小的1.2倍。设置行高更适合你的情况,如可能甚至行高= 0

+0

感谢您的信息。这有帮助。我设置的行高2pt小于字体大小。似乎是工作Madhu – Madhu

+0

如果答案奏效,你应该接受它。 –

+0

对不起,我没有看到任何链接或按钮说我接受。我点击了检查链接。我希望这是接受的方式。 – Madhu