Hi Benno,
Not sure what is going on here.
Can you show exactly what the <figure>
element with its <imagedata> element looks like (including all input
attributes), as well as the fo output that you are getting that is not
correct? Also, what version of the stylesheets are you using?
Thanks.
----- Original Message -----
Sent: Thursday, October 27, 2011 1:45
AM
Subject: [docbook-apps] rotate figures
with a pi
Hi, I have a couple of big pictures which would fit nicely
on a a4-page in landscape - orientation. To do so, I used a processing
instruction as described in Mr. Stayton's book here. The
problem seems that some attributes given to <figure> and
<imageobject> does not have an effect to the rendered PDF. I even
managed to replace the attribute to figure, pgwide="1", which seems to be
ineffective because it's is going to the <fo:block> but not to the
<fo:block-container>. That was easy since you just have to put the
start-indent="0" attribute to this wrapper in the customization layer like
that:
<xsl:template
match="d:figure[processing-instruction('landscapeFigure')]">
<fo:block-container reference-orientation="90" start-indent="0"
width="100%" height="auto">
<xsl:apply-imports/>
</fo:block-container> </xsl:template>
Problem
is now that the scalefit="1" - attribute to the <imagedata> - element
does not go through to the generated .fo so the picture is still far to big.
If the fo file would look like that:
<fo:block-container reference-orientation="90"
start-indent="0" width="100%" height="auto"><fo:block
start-indent="0pt"> <fo:block space-before.minimum="0.5em"
space-before.optimum="1em" space-before.maximum="2em"
space-after.minimum="0.5em" space-after.optimum="1em"
space-after.maximum="2em" keep-together.within-column="auto"
id="d0e159"> <fo:block space-before.optimum="1em"
space-before.minimum="0.8em" space-before.maximum="1.2em" font-weight="bold"
font-size="12pt" hyphenate="false" space-after.minimum="0.4em"
space-after.optimum="0.6em" space-after.maximum="0.8em"
font-family="inherit"
keep-with-next.within-column="always">Description</fo:block> <fo:block
id="d0e166"><fo:external-graphic src=""
width="100%" height="auto" content-width="scale-to-fit"
content-height="100%"/></fo:block></fo:block></fo:block></fo:block-container>
then the picture would fit on the page perfectly. Is there a
possibility to reach the scale-to-fit - instruction through or give it in the
customization layer?
Any answer is
appreciated.
Regards, Benno
|