You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Arved Sandstrom <Ar...@chebucto.ns.ca> on 2001/07/23 13:03:34 UTC
Re: confusion with content-height and height properties on
fo:external=graphic
At 12:14 PM 7/23/01 +0200, Petr Andrs wrote:
>when I want to include external image using fo:external-graphic and I
>want it to be scaled to specified dimension I have to use content-
>height and content-width properties. This is how I understand XSL FO
>spec and how it works in XEP and Antenna. In FOP this doesn't work. In
>FOP I was able to achieve required behavior by using height and width
>properties, which I think is not correct. Actually I don't understand
>how height and width should affect fo:external-graphic but I am quite
>sure, that specifying image's dimesions is to be done using content-
>height and content-width. Can anybody explain this and eventually fix
>FOP's behavior, plesae?
"height" and "width" pertain to the viewport - fo:external-graphic produces
a viewport/reference-area pair, just like regions do. From a printed (PDF)
perspective this is fairly meaningless, but it's nevertheless useful to
think of the viewport as being there and acting as something of a cropping
area.
You're right - you should be able to use "content-height", "content-width",
and "scaling", and not worry about "height" and "width". The latter 2 are
initially "auto" and this means that the viewport is the same size as the
content.
I haven't ever looked at the fo:external-graphic code that we have, but if
this is the way it works right now then we definitely want to fix it. I am
not sure I even understand why it wouldn't have been done that way to start
with, since it isn't any more difficult. Maybe I'm missing some arcane
little implementation point. :-)
I'll take a look over the next couple of days unless someone beats me to it.
"height" and "width", once properly implemented, will have the effect of
clipping the visible content of the image, if they are less than the
corresponding scaled "content-width" and "content-height", and "overflow" is
'hidden' or 'scroll'.
Regards,
Arved Sandstrom
Fairly Senior Software Type
e-plicity (http://www.e-plicity.com)
Wireless * B2B * J2EE * XML --- Halifax, Nova Scotia
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org