fo:外部图形之后的不需要的边距

时间:2017-03-10 15:59:42

标签: layout xsl-fo

图像后出现1 mm的边距。我的XML:

<fo:block-container position="absolute" width="47.6mm" height="160mm" font-family="Verdana">
    <fo:block-container position="absolute" height="25mm" space-after="3mm">
        <fo:block>
            <fo:external-graphic src="release heading.svg" />
        </fo:block>
        <fo:block font-size="7pt" text-align="start" color="#6f696d" display-align="center" start-indent="0mm" background-color="#efefef">
             <fo:table border-collapse="collapse">
                  ...  
             </fo:table>
        </fo:block>
    </fo:block-container>

看起来像这样:

enter image description here

我不想要白线。

我尝试设置content-height =&#34; 100%&#34;,无济于事:

<fo:external-graphic content-height="100%" src="release heading.svg" />

如果我在图像和块周围绘制边距,很明显边距在两者之间:

<fo:block border-style="solid" border-width="thin" border-color="black">
    <fo:external-graphic content-height="100%" src="release heading.svg" border-style="solid" border-width="thin" border-color="black"/>
</fo:block>

enter image description here

但我怎么摆脱它?

1 个答案:

答案 0 :(得分:1)

我刚刚在FOP论坛上找到答案。

未指定line-height属性,但计算为1.2 * font-size。因此块高于图像。

如果我在块上将font-size设置为0:

<fo:block font-size="0pt">
    <fo:external-graphic content-height="100%" src="release heading.svg"/>
</fo:block>

......这条线消失了。

相关问题