Search code examples
xsltxsl-foapache-fop

FOP: fo:block width attribute ignored?


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.


Solution

  • 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