[xep-support] Image size

Nikolai Grigoriev grig at renderx.com
Thu Jul 4 14:37:12 PDT 2002


Hi Gustaf,

> I wonder how to set the image size easily. Is use to do it with
> percent, on either content-width or content-height, so that
> the relative sizes are kept the same, but I often have to try
> more than once to get an image to fit exactly.

XSL FO Recommendation provides a means to do it:

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

"Width" and "height" properties set dimensions of the viewport where the
image is placed; a special keyword "scale-to-fit" forces the respective
dimension of the image to fit the viewport size exactly. Unlike
content-width/height, percentages in the viewport dimensions
behave exactly like percentages on a block-container, and refer
to respective dimensions of the closest block area.

However: XEP 2.7x does not support it. Nor can I find any workaround. Sorry.

> Also, I used to think content-width="100%" meant 100 percent of the region
> width, but obviously it's not that simple. What does 100% mean in this
> case, and is there a way to express "100 percent of region width" in FO?

Not exactly. Percentages in "content-width/height" mean a scaling factor
from an intrinsic size. To denote 100% of region width, you should use
width="100%" and content-width="scale-to-fit; but, as I said, this is not
supported in the current version of XEP.

Regards,
Nikolai Grigoriev
RenderX



-------------------
By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



More information about the Xep-support mailing list