flyingsaucerproject / flyingsaucer

XML/XHTML and CSS 2.1 renderer in pure Java
Other
2.01k stars 559 forks source link

Improve table layout #185

Open OndrejSpanel opened 1 year ago

OndrejSpanel commented 1 year ago

I would like to improve layouting for tables. In particular I want to be able to use tables so that one row uses all available space not used by the others. At the moment, when I tell table to use 100% of the height, it is always the last table row which get all space not used by previous rows.

Individual rows accept absolute dimensions (px or em), but relative dimensions, like 50% or 100% are ignored.

I guess classes which need adjusting are perhaps TableRowBox and TableCellBox.

Would you give me any hints how can be a task like this acomplished, or if there is something similar done in other areas of Flying Saucer?

In this PR I have added two examples demonstrating the issue, using different ways how to create the tables, both with the same result:

image