tags:

views:

1035

answers:

2

Hi all,

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.

+2  A: 

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

Jeremias Märki
I tried almost anything: fo:inline-container, max-width, border-before-precedence, last-line-end-indent, and many more combinations, but I didn't tried your combination. I give you a +1 because it sounds correct. Thanks a lot for your answer.
ATorras
A: 

Finally I have not been able to do that, because [fo:inline] tries to gather all the available space.

One trick is to put margins (left or right) to the 90% or more to fill that gap, but I then have no clue the previous [fo:inline] text was rendered in one, two or more lines.

The only way I found to generate the column's titles is using [fo:table] plus adding margins (left & right) to each cell.

PS: I use FOP-0.95

ATorras