Need instream-foreign-object and text to both align to the bottom in XSL-FO

折月煮酒 提交于 2020-02-25 11:53:22

问题


I have an XSL-FO stylesheet that is used for generating a barcode with a piece of description text immediately after it. When I run it through the Ibex FO application, the text properly lines up with the bottom of the barcode. When I run it through Apache FOP (it's an older version 0.3x... I CAN'T change this), the text lines up with the TOP of the barcode (I need it to work the same in both). I'm really hoping there is some workaround here. This is what I have:

<xsl:template match="barcode">
    <fo:block>
        <fo:instream-foreign-object content-width="100%" content-height="100%">
            <xsl:call-template name="barcode-3of9">
                <xsl:with-param name="value" select="@value"/>
            </xsl:call-template>
        </fo:instream-foreign-object>
        <xsl:value-of select="description"/>
    </fo:block>
</xsl:template>

This is contained inside of a table cell, with two columns of these blocks existing. I'm trying to match the output of an older application, and so I can't put the description in a different cell from the barcode, as I need the description to bump up against the edge of the barcode, rather than all the descriptions being aligned.

Is there a workaround I can use here? I'm pretty much out of ideas.

来源:https://stackoverflow.com/questions/1214296/need-instream-foreign-object-and-text-to-both-align-to-the-bottom-in-xsl-fo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!