xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Squeezing content in block-container
Date Thu, 20 Apr 2006 11:56:01 GMT
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


Mime
View raw message