XSL-FO静态图像左下方的文档,动态文本围绕2列布局流动?

时间:2011-03-23 11:01:44

标签: xsl-fo apache-fop

我正在使用来自外部源的动态XML / XSL-FO创建PDF, 我需要页面左下方的图像,但它不能正常工作并在图像周围流动文本。

使用的xsl如下 - 注意花是对fo:epream-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毫米”它可以工作,但文本溢出图像。)

如何将图像放在正确的位置并且文本环绕,文本也是可变的并且可以更改,因此无法计算文本内嵌图像的位置。

1 个答案:

答案 0 :(得分:1)

只要您使用FOP,它就无法使用。不支持fo:float格式化对象。请参阅http://xmlgraphics.apache.org/fop/compliance.html#fo-object-float

相关问题