需要 instream-foreign-object 和文本都与 XSL-FO 中的底部对齐

发布于 2024-07-29 13:25:59 字数 805 浏览 2 评论 0原文

我有一个 XSL-FO 样式表,用于生成条形码,其后紧接着是一段描述文本。 当我通过 Ibex FO 应用程序运行它时,文本与条形码的底部正确对齐。 当我通过 Apache FOP 运行它时(它是旧版本 0.3x...我无法更改它),文本与条形码的顶部对齐(我需要它在两个版本中都具有相同的工作方式)。 我真的希望这里有一些解决方法。 这就是我所拥有的:

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

它包含在表格单元格内,其中存在两列这些块。 我正在尝试匹配旧应用程序的输出,因此我无法将说明放在与条形码不同的单元格中,因为我需要说明与条形码的边缘相抵触,而不是所有说明正在对齐。

我可以在这里使用解决方法吗? 我几乎没有主意了。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文