Benno
 
I have had similar problems in the past but have solved them with the  
following:
 
     <!-- ============== Flipping a figure 90  degrees - Landscape  
================== 
Use it  this way
<figure>
<?landscapeFigure?><title>My figure  title</title>
...
</figure>
-->
<xsl:template  match="figure[processing-instruction('landscapeFigure')]">
<fo:block-container  reference-orientation="90"
margin-left="0in"  margin-right="0in"
margin-top="0.25in"  margin-bottom="0in"
padding-top="0in" padding-bottom="0in" display-align="before">  
<xsl:apply-imports/>
</fo:block-container>
</xsl:template>

This doesn't look much different from yours, but the scale-to-fit come all  
the way through for me. I am using FOP 1.0. I have another similar template 
 that is for tables but leaves off the "display-align". On tables the 
"pgwide=1"  does work, but not with figures
 
Also, the placement of the PI is very important - right after  "figure".
 
 
Regards,
Dean Nelson
 
 
In a message dated 10/27/2011 1:45:22 A.M. Pacific Daylight Time,  
[email protected] writes:

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_ 
(http://www.sagehill.net/docbookxsl/LandscapeImage.html) . 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="url(Pictures/MessageFlow.png)"  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  


Reply via email to