I have a Docbook 4 document with several very tall graphics (not all but some of them are much taller than their width). I want them to scale to fit on the page automatically.
Is there a way to define this in stylesheet? There are over a 1000 graphics and I don't want to check them all by myself.
At the moment it looks like this:
<figure>
<title>Some Title</title>
<mediaobject>
<imageobject>
<imagedata fileref="graphic.svg" width="100%" scalefit="1" contentdepth="100%"/>
</imageobject>
</mediaobject>
</figure>
but its only fits the width not the height. So the graphic overlaps with the elements before and after.
As fop i have to use apache-fop.
In order to scale the graphics with an fo:external-graphic, you can use the attributes content-height and/or content-width with the value 'scale-down-to-fit'