问题
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