Hi damartin,
it can be surprisingly hard to achieve "fill whatever random amount of space is available" - layouts, I suppose this has to do with Prince's lack of so-called reflow and the problem that trying to express something like this in CSS might cause never-ending layout loops. However, I have found a workaround you might try.
Generally, I suggest that you set
border-bottom, border-left and border-right in the
@page - rule, and
border-top in the
#section2_bottom rule. You will now have solved the problem with the box not extending to the bottom of the page. However, you now have a new problem: the left and right borders for the page area will extend upwards above the top border of section2.
To mask this, you can make the top elements on the page ever so slightly wider, give them a background colour and position them to overlay the undesirable borders. For example add something like
#section2_head {
width: 188mm;
margin-left: -1mm;
background-color: #fff;
}
.line_after {
background: #fff;
width: 101%;
margin-left: -0.5%;
}
(experimenting with different units just to try to explain the concept..)
If you find it is too jarring that the header parts might be 1mm or so too far left, you may have to experiment with padding on TABLE, TR or THEAD - not sure what Prince supports here but I think the approach can deliver the effect you want although it is a bit of a hack.
Announcement: repos for tests/utils