Hi
I am new to using XSL-FO. I want to print a document with a quotation section
(which may be less than or more than one page long) followed with a remittance
advice section, which must only print at the end of the document, at a fixed
position at the bottom of the page (to enable user to tear it off). If there
is no space for the remittance advice on the last page of the quotation, the
remittance advice must print at the bottom of the next page (which will then be
a empty page with only the remittance section printed at the bottom).
After investigating as well as I could, I ended up with 3 possibilities:
1 – using page-master-alternatives, with a different page-master for the last
page, with a region-after section big enough to print the remittance advice
into.
The problem I have, is that it works perfectly if the output is more than one
page long, but, if less than one page, the text in the region-after section
just does not print. What am I doing wrong? (example of XSL code used attached)
2 – to use the footnote, but I can’t figure out if you can set it to print at a
certain position or of a specific size, and to fit it in, and, if, not, to
print at the bottom of the next page?
3 – Can I use a block-container? It seems that I will then have a problem to
prevent it from printing over existing text?
I will appreciate all the help I can get.
Thank you
Linda Burgess
XSL used for possibility 1: (I am at this stage just printing ‘dummy’ data)
<xsl:template match="/ROWSET">
<fo:layout-master-set>
<!-- Page master for last page -->
<fo:simple-page-master master-name="lastPage"
page-height="297mm"
page-width="210mm"
margin-top="10mm"
margin-left="10mm"
margin-right="10mm">
<fo:region-before region-name="last-header" extent="30mm"/>
<fo:region-body margin-top="25mm"
margin-bottom="100mm"
font-size="10pt"
font-family="Times New Roman"/>
<fo:region-after region-name="last-footer"
extent="95mm"/>
</fo:simple-page-master>
<!-- Page master for other pages -->
<fo:simple-page-master master-name="rest"
page-height="297mm"
page-width="210mm"
margin-top="10mm"
margin-left="10mm"
margin-right="10mm">
<fo:region-before region-name="rest-header" extent="30mm"/>
<fo:region-body margin-top="25mm"
margin-bottom="10mm"
font-size="10pt"
font-family="Times New Roman"/>
<fo:region-after region-name="rest-footer" extent="10mm"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="document">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference
master-reference="lastPage" page-position="last"/>
<fo:conditional-page-master-reference
master-reference="rest" />
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="document">
<fo:static-content flow-name="last-footer">
<fo:block >
<fo:inline>*** last page - region after ***</fo:inline>
<fo:table table-layout="fixed" width="189mm" font-size="10pt">
<fo:table-column column-width="150mm"/>
<fo:table-body>
<fo:table-row> <fo:table-cell> <fo:block> <fo:inline>yyyy
</fo:inline> </fo:block> </fo:table-cell> </fo:table-row>
<fo:table-row> <fo:table-cell> <fo:block> <fo:inline>yyyy
</fo:inline> </fo:block> </fo:table-cell> </fo:table-row>
<fo:table-row> <fo:table-cell> <fo:block> <fo:inline>yyyy
</fo:inline> </fo:block> </fo:table-cell> </fo:table-row>
<fo:table-row> <fo:table-cell> <fo:block> <fo:inline>yyyy
</fo:inline> </fo:block> </fo:table-cell> </fo:table-row>
<fo:table-row> <fo:table-cell> <fo:block> <fo:inline>yyyy
</fo:inline> </fo:block> </fo:table-cell> </fo:table-row>
<fo:table-row> <fo:table-cell> <fo:block> <fo:inline>yyyy
</fo:inline> </fo:block> </fo:table-cell> </fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block> <fo:inline>This is the body</fo:inline> </fo:block>
<fo:block>
<fo:table table-layout="fixed" width="189mm" font-size="10pt">
<fo:table-column column-width="150mm"/>
<fo:table-body>
<fo:table-row> <fo:table-cell> <fo:block> <fo:inline>xxxxxxxx
</fo:inline> </fo:block> </fo:table-cell> </fo:table-row>
<fo:table-row> <fo:table-cell> <fo:block> <fo:inline>xxxxxxxx
</fo:inline> </fo:block> </fo:table-cell> </fo:table-row>
<fo:table-row> <fo:table-cell> <fo:block> <fo:inline>xxxxxxxx
</fo:inline> </fo:block> </fo:table-cell> </fo:table-row>
<!—repeat to force page break →
</fo:table-body>
</fo:table>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>