Hi Tobias,
Tobias Anstett [k15t.com] wrote:
> Hi,
>
> Recently I had a problem with image overflows using Apache as well as XEP.
>
> I use both very wide and very high images in my documentation. When
> applying my customization layers they are always scaled to match the
> width of the page but I have problems if the image is still to high to
> match the available page space/size.
>
> Using Apache images are just rendered on top of the page ignoring the
> page master setup (so above header, body, footer, starter ...) not
> fitting into the available area in the body.
> Using XEP there is just some information in the logs stating that XEP
> was not able to satisfy the constraints and (!!!) does not print the
> image at all.
>
> I use <d:imagedata width="100%" contentdepth="100%" .../> in docbook.
> Is there a way to enable some kind of auto-fit functionality? In a
> customization layer producing some kind of powerpoint slide layout I
> overwrote the graphic template to set the (maximum) height. Now,
> i) very wide but not that high images are scaled to fit the available width
> (OK)
> ii) very high but not very wide images are scaled to fit the available
> height (OK)
> iii) small images are upscaled to match height or respectively the
> width (NOT REALLY OK)
>
>
> Do somebody have a solution for point iii ?
Not sure of what needs to be done at the DocBook level, but at the
XSL-FO level you should generate something like this:
<fo:external-graphic src="url('path/to/the/image')"
inline-progression-dimension.maximum="100%"
content-width="scale-down-to-fit"
block-progression-dimension.maximum="<height of region-body>"
content-height="scale-down-to-fit"/>
That should keep small images to their natural widths and scale down
bigger images.
HTH,
Vincent
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]