1
votes

In my current XSL-FO Master-Flow declaration, my body section overflows my footer.

w.write("<fo:simple-page-master master-name=\"main-master\" "); 
w.write("page-height=\"11in\" page-width=\"8.5in\" margin-top=\".5in\" ");\
w.write("margin-bottom=\".5in\" margin-left=\".5in\" margin-right=\".5in\">");  
//w.write("<fo:region-body margin-top=\"20mm\" margin-bottom=\"4in\"/>");
w.write("<fo:region-body margin-top=\"25mm\" margin-bottom=\"1in\" space-after=\"1.5in\"/>");
w.write("<fo:region-before  extent=\"13mm\"/>");
w.write("<fo:region-after region-name=\"footer\"  extent=\"0mm\"/>");
w.write("</fo:simple-page-master>");

As suggested in this question I have tried adjusting the margin-bottom and extent of region-after, to no avail. Previously the margin-bottom was set to 4 inches to prevent this (due to the large image needed at the bottom of my page body) but this creates an unsightly large empty space at the bottom of each page. And space-after does not seem to help either.

How can I prevent the body of my xsl-fo text from overflowing onto my footer?

1
Instead of showing us parts of the code that is used to generate FO markup, please provide actual markup (preferably a complete FO document that demonstrates the problem).mzjn
@mzjn is correct as we cannot tell from your sample what you mean. Your words -- setting extent of the region-after and the margin-bottom of the page master is correct. If you want a different size for a particular page (like you have a page with the image) then you can use either a different page-sequence for the different size pages or if they are positional (like the first page), then you use alternatives that are selected in this way. We cannot help with a better picture and a full XSL FO.Kevin Brown

1 Answers

1
votes

You may use a fo:static-content element that refers to your region-after footer .See the example bellow :

<xsl:template name="Main" match="/">
    <fo:page-sequence master-reference="main-master" >
        <fo:static-content flow-name="footer">
            <xsl:call-template name="MyFooter"/>
        </fo:static-content>
        <fo:flow>
            ...
        </fo:flow>
    </fo:page-sequence>
</xsl:template>

From W3Schools :

The object contains static content (e.g. headers and footers) that will be repeated on many pages.

The object has a "flow-name" property that defines where the content of the object will go.