FOP: fo:block width attribute ignored?

ATorras picture ATorras · May 20, 2009 · Viewed 15.1k times · Source

I'm managing to generate a PDF with one line-chart from google-chart, but the quality of the generated columns titles doesn't fit our needs, so I want to generate by myself.

This task should be done using [fo:table] but I'm not able to positionate succesfully the titles (widths and margins/paddings).

In sum up, I want to put the titles using [fo:block] setting the width attribute plus a negative margin (i.e. width="1.5cm" margin-top="-2em"), but the width doesn't take effect.

Do you know how to do it?

Thanks.

Answer

Jeremias Märki picture Jeremias Märki · May 21, 2009

The "width" property doesn't apply to fo:block (see http://www.w3.org/TR/xsl11/#fo_block). If you want to redefine the width, you need to use an fo:block-container (http://www.w3.org/TR/xsl11/#fo_block-container) or another element that generates a so-called reference area. It's a bit difficult to understand what exactly your expected layout is. Maybe you can also experiment with using "start-indent" and "end-indent" properties to indirectly influence the actual width of an fo:block. HTH