You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Ringoot Pascal <Pa...@nbb.be> on 2004/01/23 13:53:53 UTC

Rotating dynamic content

Hi all,

When switching from portrait to landscape orientation, I would like to have the header/footer always at the same place when printed.  Since FOP does not support reference-rotation in 0.20.5, one can accomplish this by including a rotated SVG in the appropriate page region, as in the following code fragment

<fo:instream-foreign-object>
<svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="30" height="100">
<svg:text x="40px" y="10px" transform="rotate(-90) translate(-79,3)" style="fill:rgb(0,0,0);font-size:12;font-family:sans-serif;">
	Page <fo:page-number/>
</svg:text>
</svg:svg> 
</fo:instream-foreign-object>  

But, since the inclusion of a graphic seems to happen before the actual rendering, the fo:page-number is undefined.

Any ideas how to solve this problem ?

Regards,
Pascal

Re: Rotating dynamic content

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Ringoot Pascal wrote:
> When switching from portrait to landscape orientation, I would like to have
> the header/footer always at the same place when printed.  Since FOP does not
> support reference-rotation in 0.20.5, one can accomplish this by including a
> rotated SVG in the appropriate page region, as in the following code fragment
> 
> <fo:instream-foreign-object>
> <svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="30" height="100">
> <svg:text x="40px" y="10px" transform="rotate(-90) translate(-79,3)"...>
> 	Page <fo:page-number/>
> </svg:text>
> </svg:svg> 
> </fo:instream-foreign-object>  
> 
> But, since the inclusion of a graphic seems to happen before the actual
> rendering, the fo:page-number is undefined.

Embedded SVG are treated as a unit, the FO processo won't look inside
the SVG code. Everything in there is passed to the SVG renderer, which
doesn't know anything about elements in the XSLFO namespace.

It seems you want to have a page with normal header+footer but the content
in landscape orientation. There is no way to get this without changing the
reference-orientation, which isn't implemented in 0.20.5.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org