xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: (Postscript) transformation of block-container
Date Tue, 24 Apr 2007 20:05:56 GMT
Hi Peter

On 23.04.2007 17:30:04 Peter Coppens wrote:
> 
> Gentlepeople,
> 
> Does anyone know how I could apply a postscript transformation on the
> content of a block-container.

No, I'm afraid, that's not possible. Not from XSL-FO anyway.

> What I currently do is render the container content to png and then use svg
> to do the transformation. 
> 
> I would however like to keep the content as text and have not found a way to
> achieve that.

How about doing the whole thing in SVG?

> The basic use case is arbitrary rotation of (fop formatted) text blocks, but
> scaling and skewing might be nice to have as well.
> 
> Any guidance, as always, most warmly welcomed!

There's one hack you can try (0.93 or later): Manipulating the area tree
XML

Give your block-container an "id". If you render your document using -at,
you get an XML file. Locate the "block" element that has a "prod-id"
attribute with the id you've given the block-container. There may be
more than one. Choose the one that has is-viewport-area="true". There,
you'll find an attribute called "ctm". That's a transformation matrix.
If you manipulate it you may be able to achieve the effect you seek.
After modifying the XML you can render the XML file to PostScript using
-atin instead of -fo.

More info: http://xmlgraphics.apache.org/fop/0.93/intermediate.html

HTH

Jeremias Maerki


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


Mime
View raw message