I've done a local hack that tries to squeeze all content of a
block-container into the available area if that's possible based on the
available "shrink". I've done this by modifying
PageBreakingAlgorithm.computeDemerits():
[..]
demerits += activeNode.totalDemerits;
if (singlePartMode && activeNode.line > 0) {
demerits += 1000;
}
return demerits;
singlePartMode is a boolean which is true when processing a
block-container. The same could be used for static-content.
This will increase the demerits a lot if the breaker tries to create
more than one part/line and indirectly forces the breaker to use the
shrink value. Is that a good solution or does anyone have a better idea?
Thanks,
Jeremias Maerki