我正在使用来自外部源的动态 XML/XSL-FO 创建 PDF,我需要页面左下方的图像,但它不工作并且在图像周围流动文本。
使用的 xsl 如下 - 注意花是对 fo:instream-foreign-object 作为 SVG 的片段的调用
<fo:flow flow-name="xsl-region-body">
<xsl:variable name="header" select="descendant-or-self::*[@id='prop_header']"/>
<xsl:variable name="title" select="substring-before($header,'-')"/>
<xsl:variable name="price" select="substring-after($header,'-')"/>
<fo:block xsl:use-attribute-sets="address"><xsl:value-of select="$title"/></fo:block>
<fo:block space-after="5mm" xsl:use-attribute-sets="innerprice"><xsl:value-of select="$price"/></fo:block>
<fo:block>
<fo:float float="left" width="61mm" clip="2mm" padding="1mm"
border-color="$grey" border-width="0">
<fo:block-container padding="0pt" margin="0pt" absolute-position="absolute" top="{$bleed + 200}mm" left="0mm" >
<xsl:call-template name="flower">
<xsl:with-param name="width">61</xsl:with-param>
<xsl:with-param name="height">49</xsl:with-param>
</xsl:call-template>
</fo:block-container>
</fo:float>
</fo:block>
图像显示在底部,但文本一直被推到页面的右侧,(在 61 毫米处 - 如果我将宽度设置为 1 毫米,它可以工作,但文本会溢出图像。)
我怎样才能将图像放在正确的位置并且文本环绕,文本也是可变的并且可以更改,因此无法计算文本内嵌图像的位置。