Jeremias Maerki wrote:

A problem surfacing with the first expectation is the "page x of y" problem: The usual empty block with an "EOF"-ID at the end of all content in the fo:flow ends up on the next-to-last page which causes the last page to display "page n of n-1". Either the breaker has to detect such an element and force it on the last page or a different approach has to be taken to place the "EOF" marker.

Just a quick untested idea: what about adding a way get the page number of the last page without the need to add a marked block and a page-number-citation? ... wait, we can even avoid inventing something new: the 1.1 specs define a fo:page-number-citation-last element!

If we don't have any more a block that must be necessarily placed in the last page, we could use the width of the "finishing glue" (that could be negative too) in the ending elements added by the LineLM, in order to handle the difference between non-last page height and last page height.

If the last-page BPD is bigger, the width will be < 0, in other words the last, forced page break has a "discount" on the content elements width; if the last-page BPD is smaller, the width will be > 0, which means that we build a page with the same height but some "reserved" space, unavailable for the content areas.

Regards
    Luca

Reply via email to