FOP does not support automatic table layout ("autofit" tables) yet.
If the fo:table
doesn't have fo:table-column
children (or they don't have the column-width
property), the available width is equally parted between the columns.
This is what is happening with you table:
- each column of the outermost table, including the one with the nested tables, is given 1/3 (33.3%) of the available width
- the first nested tables has 4 columns, each of which is given 1/4 * 1/3 (8.3%) of the available width
- each column of the innermost table is given 1/3 * 1/4 * 1/3 (2.8%) ot the available space
In order to create a better looking PDF, you have to modify you xsl stylesheet so that your fo:table
elements contain fo:table-column
elements with a column-width
property, either expressed as a length or a percentage.