W3C home > Mailing lists > Public > www-xsl-fo@w3.org > August 2007

Re: 'scale-to-fit' in both directions

From: Jean-Yves Belmonte <john@pixware.fr>
Date: Tue, 21 Aug 2007 11:23:01 +0200
Message-ID: <46CAAEF5.804@pixware.fr>
To: www-xsl-fo@w3.org

Tony Graham wrote:
> On Fri, Aug 17 2007 12:19:30 +0100, john@pixware.fr wrote:
>>Given this XSL-FO fragment:
>>  <fo:external-graphic
>>    border="solid 1pt"
>>    content-height="scale-to-fit"
>>    content-width="scale-to-fit"
>>    height="2in"
>>    width="5in"
>>    src="url(images/flower1.jpeg)"
>>  />
>>I would have expected the content size to match exactly the viewport
>>size, possibly leading to non-uniform scaling. It seems that XEP has a
>>different interpretation, as it preserves the original aspect ratio
>>(see attached PDF). Is that the correct behaviour? (This is the result
>>I would expect with 'content-width' set to 'auto' instead of
> Add 'scaling="non-uniform"': the initial value of 'scaling' is
> 'uniform'.  See
> http://www.w3.org/TR/2006/REC-xsl11-20061205/#scaling

Right, but I used to think that the 'scaling' property was meaningful only 
when 'content-width' or 'content-height' was set to 'auto'. Since XEP yields 
the same result with 'content-width="5in"' and 'content-height"2in"' I was 
probably wrong, but still it seems a bit strange to me that 'scaling' be 
relevant when both 'content-width' and 'content-height' are explicitly 


Received on Tuesday, 21 August 2007 09:23:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:10:06 UTC