java - XSL-FO Body Overflows Footer -


in current xsl-fo master-flow declaration, body section overflows 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 have tried adjusting margin-bottom , extent of region-after, no avail. margin-bottom set 4 inches prevent (due large image needed @ bottom of page body) creates unsightly large empty space @ bottom of each page. , space-after not seem either.

how can prevent body of xsl-fo text overflowing onto footer?

you may use fo:static-content element refers region-after footer .see 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 , footers) repeated on many pages.

the object has "flow-name" property defines content of object go.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -