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 Adam Augusta <ro...@WPI.EDU> on 2004/07/02 19:38:50 UTC

Embedding FOP in SVG in FOP?

Apparently FOP doesn't support rotating areas.  The compliance page 
suggests using SVG, but then I'd have to have radically different 
transforms for handling block spacing, progression, etc just because an 
area was rotated.

To that end, I was thinking of generating the area in FOP, and somehow 
saving that output and giving it to SVG to rotate, which I would in 
turn embed in FOP.  Has anyone had experience with this or other, 
hopefully better, workarounds?

-Adam



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


Re: Embedding FOP in SVG in FOP?

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Adam Augusta wrote:

> Apparently FOP doesn't support rotating areas.  The compliance page 
> suggests using SVG, but then I'd have to have radically different 
> transforms for handling block spacing, progression, etc just because an 
> area was rotated.
> 
> To that end, I was thinking of generating the area in FOP, and somehow 
> saving that output and giving it to SVG to rotate, which I would in 
> turn embed in FOP.  Has anyone had experience with this or other, 
> hopefully better, workarounds?

Hmm, maybe a multi-stage sollution:
- Extract the rotated content and render into an SVG. Beware,
  the SVG renderer has a few more bugs than the other.
- Add a rotation transformation to the SVG
- Render the rest of the content, referring to the SVG.
Of course estimating the size of the page master of the rotated
content as well as the SVG dimensions maz be non-trivial, also
multi-page rotated content  content.

If the rotated content isn't mixed with non-rotated content on
the same page, it may be more convenient to use a rotated page
master instead (the usual answer to "I want landscape").
If there are both normal and landscape page sequences, post-processing
with iText will clean it up for on-screen viewers.

J.Pietschmann

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


Re: Embedding FOP in SVG in FOP?

Posted by Jeremias Maerki <de...@greenmail.ch>.
The work-around obviously only works for simple cases. In FOP 0.20.5
there's no chance to do what you suggest. Even with the current
development code I doubt this would be so simple. I don't think this is
even on the task list.

Theoretically, you could try to create a Batik extension to handle FO
elements. You could then write a simple wrapper around the FO snippet to
create a full XSL-FO document that could be rendered by FOP's AWT
renderer to the Graphics2D interface given by Batik. But this is very
adventurous.

It's probably better on the long run to somehow support the current
development so FOP 1.0 gets into arm's reach.

On 02.07.2004 19:38:50 Adam Augusta wrote:
> Apparently FOP doesn't support rotating areas.  The compliance page 
> suggests using SVG, but then I'd have to have radically different 
> transforms for handling block spacing, progression, etc just because an 
> area was rotated.
> 
> To that end, I was thinking of generating the area in FOP, and somehow 
> saving that output and giving it to SVG to rotate, which I would in 
> turn embed in FOP.  Has anyone had experience with this or other, 
> hopefully better, workarounds?


Jeremias Maerki


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