xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas L Delmelle <a_l.delme...@pandora.be>
Subject Re: 0.90alpha1: content-width="scale-to-fit" creates damaged PDF
Date Sat, 10 Dec 2005 19:56:18 GMT
On Dec 10, 2005, at 00:14, JBryant@s-s-t.com wrote:

Hi Jay,
>> See above: If you're not overriding the default resolution,
>> this is caused by the fact that 528px is 7.33in in the
>> default resolution.
> I don't think that's the issue. The algorithm in that template is  
> "if the
> image is more than 396 pixels wide, scale the image". It doesn't  
> try to
> scale the image to 396 pixels. So, the line in the FO file is

What I meant was that you would only scale images that are larger  
than the assumed 5.5in, which is actually 7.33in in default  
resolution. So, the images between 5.5in and 7.33in won't be scaled  
down, but they won't fit either...

> <fo:external-graphic src="someimage.gif" content-width="scale-to- 
> fit"/>

This is tricky. See the remark about auto-width in my previous mail.  
How is the formatter supposed to determine the width here if the  
content-size isn't a fixed value? I suppose it then takes the  
intrinsic image-height as a basis, so again, the image may end up too  
large to fit in the area...

<snip />
> It's my understanding that content-width="scale-to-fit" should
> shrink larger images and expand smaller images to fill the width of  
> the
> content area.

The content-area is that of the external-graphic itself, so...
Yes, but only if the width specified on the external-graphic is fixed/ 
absolute or a percentage of the width of the containing block. If the  
width is 'auto', the formatter must use the content-size...

> At this point, I suspect that content-width="scale-to-fit" is not  
> working
> correctly.

On the contrary, it is working almost perfectly, apart from the minor  
bugger I mentioned in the previous mail... and now that I come to  
think of it, even that could turn out to not be erroneous.

Think of it this way:

<fo:external-graphic src="image.gif" content-width="scale-to-fit" />

is the same as

<fo:external-graphic src="image.gif" width="auto" content- 
                      height="auto" content-height="auto" />

which would mean... Right!



To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

View raw message