As Pascal recommends below, I use the content-width property to scale images. In my case, I set the content-width as specified in the XML input:

<fo:external-graphic>
<xsl:attribute name="src">
<xsl:value-of select="url" />
</xsl:attribute>
<xsl:attribute name="content-width">
<xsl:value-of select="width" />
</xsl:attribute>
</fo:external-graphic>

Hope that helps.

-Terence Bandoian


On 3/30/2012 9:12 AM, Pascal Sancho wrote:
Hi,

like width or height, i-p-d and b-p-d usage don't resize images, but the rectangle allocated to it. Once you have defined your rectangle (using "elastic" dimensions or not, depending on *.minimum, *.maximum and *.optimum values), you should use content-* properties to rescale your image, if needed.

Note that FOP doesn't implement allowed-*-scale properties (see [1])

[1] allowed-height-scale


Le 30/03/2012 16:58, Sergiu Dumitriu a écrit :
On 03/30/2012 09:43 AM, Amick, Eric wrote:
I’m using FOP 1.0, and I’m trying to scale an image that is too large
for the page so that it fits. What attributes do I need to use? I can’t
figure out which ones I need or what values are required.

Eric Amick Systems Engineer II

The best way of scaling images that I've found so far is a bit more complex:

<fo:external-graphic
    inline-progression-dimension.minimum="auto"
    inline-progression-dimension.maximum="100%"
    block-progression-dimension.minimum="auto"
    block-progression-dimension.maximum="6.5in"

I you also have a target size that you'd like the image to have, you can
also add one or both of these:

    inline-progression-dimension.optimum="300pt" (for the width)
    block-progression-dimension.optimum="300pt" (for the height)

You can read about all the ways of controlling width and height at
http://www.w3.org/TR/xsl/#d0e22982


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to