forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <>
Subject Re: Tables, FOP, and page orientation
Date Fri, 06 Feb 2004 14:39:09 GMT

Florian Haas wrote:
> Hello again.
> I'm currently using Forrest to put together some documentation which
> contains lots of information in tabular format. When rendered, everything looks
> beautiful in HTML, but things are getting a bit ugly for the PDF output. I assume
> this is largely due to limitations in FOP (table-layout="auto" not supported
> etc.).

When I wrote the original PDF stylesheets I put in a horrible hack that 
simply gave an equal amount of space to every table column regardless of 
the contents within it. Unfortunately that hack is still there.

This could be improved considerably with some clever XSL stuff (estimate 
the size of each column and assign widths as applicable).

Of course, it would be even better if someone could find the time to 
implement it in FOP. This is an itch of mine, but it hasn't got strong 
enough yet and I don;t know FOP so it'll have to get pretty strong 
before I tackle it personally.

> The situation is made worse, however, by the fact that the PDF output is
> always generated in portrait mode. Is there a way to tell the Forrest FO
> stylesheets to switch to landscape, if even globally for the entire site? I tried
> grepping the CVS checkout tree for "portrait" or "landscape", but to no avail.
> Searching for "orientation" returns several results, but AFAICS they're all
> SVG-related.

You will need to edit the document2fo.xsl stylesheet. I've never 
actually done this but I *think* the property you need to play with is 
called reference-orientation. If I am right, setting this to "90" text 
in the relevant block will be rotated through 90 degrees.

You are right that this should be set from a parameter, you can see lots 
of examples of this kind of configuration already in the XSL, the values 
are set in skinconf.xml and passed to the stylesheet by the relevant 
*.xmap file when the transformation is called.

Hope this helps, if not let us know, it would be great to see a patch 
for this.


View raw message