Search code examples
xslt-2.0xsl-fo

how to fill page with empty rows or get the distance from the node to the bottom of the page?


enter image description here

The amount of data is uncertain and the height of each piece of data is also uncertain.When a page is left over, I want the remaining pages to be filled with tables as well.How to do it with xsl-fo?please

 <xsl:stylesheet version="1.1"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:fo="http://www.w3.org/1999/XSL/Format"
        xmlns:java="http://xml.apache.org/xalan/java" 
        xmlns:jfn="http://xml.apache.org/xalan/java/cn.net.jully.common.util.JullyXslUtil"
        exclude-result-prefixes="fo java jfn">
        <xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes" />`enter code here`
        <xsl:include href="../include/common.xsl" />

Solution

    1. Use transparent as the color of the borders for your table.

    2. In the fo:static-content for the region-before, make an empty table of the correct size and in the correct position to appear to be the table for the data.

    This assumes that the table column widths are fixed. If you are using automatic table layout, then the formatter will work out the widths of the columns and you won't know what widths to use in your background table.