0

我正在使用 DITA 和开箱即用的 DITA-OT pdf2 插件创建出版物。图像没有缩放以适应页面,而是运行巨大并被页面截断。我更喜欢保持开箱即用的插件,所以我首先创建了一个自定义文件夹并修改了 custom.xsl 文件以显示:

  <fo:external-graphic src="url({$href})" xsl:use-attribute-sets="image">

            <xsl:attribute name="content-width">
                <xsl:value-of select="concat(@scale,'%')"/>
            </xsl:attribute>

    </fo:external-graphic>

当这不起作用时,我尝试修改插件中的 xsl/fo/commons.xsl 文件以更改

    <fo:external-graphic src="url({$href})" xsl:use-attribute-sets="image">

            <xsl:attribute name="content-width">
                <xsl:value-of select="concat(@scale,'%')"/>
            </xsl:attribute>

    </fo:external-graphic>

这也不起作用。我还尝试在 commons.xsl 文件中对 scale-to-fit 属性进行硬编码:

    <fo:external-graphic src="url({$href})" content-height="scale-to-fit" content-width="scale-to-fit">

    </fo:external-graphic>

我很确定 FO 仍在以某种方式读取高度和宽度并插入它们,但我不知道在哪里可以覆盖内容高度和宽度以适应缩放。有任何想法吗?

4

0 回答 0