[xep-support] Re: Image scaling

Alexei Gagarinov agagarinov at renderx.com
Tue Dec 9 22:00:08 PST 2008


Hi Mark,

> <fo:block line-height="0pt">
>   <fo:external-graphic
>         content-width="scale-to-fit" content-height="scale-to-fit"
>         scaling="non-uniform" scaling-method="resample-any-method">
> ...

You should set the viewport's area using @width and @height attributes 
on the fo:external-graphic element.

If @width and @height are omitted then they are treated as 'auto' and it 
means that viewport's area equals to the intrinsic size of the graphic.

And what you do is scaling the intrinsic size of the image to the ... 
yeah, to the same value.

So, in order to scale the graphics width to a table cell, you need the 
following:
<fo:external-graphic width="100%" content-width="scale-to-fit" src="...">

But you cannot scale the image's height to an arbitrary block (a table 
cell in your example) using a percentage value because the height of 
this block depends of its content.
So you should know the height of the surrounding box ahead and specify 
this length as a value of @height on fo:external-graphic.

Regards,
   Alexey Gagarinov
RenderX

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html



More information about the Xep-support mailing list