Custom PDF plugin doesn't recognize FIRST and LAST body pages
Posted: Mon Dec 28, 2020 9:26 pm
I need different footers for the FIRST and LAST page of my body in an existing custom PDF DITA-OT plugin.
I have:
When I run it the resulting PDF has the ODD footer on page 1 and the EVEN footer on the last page (which is an even numbered page). I have compared it with other PDF plugins where the FIRST and LAST pages are treated differently, and I cannot find what differs to make it work. Any help is greatly appreciated!
Regards,
GW
I have:
Code: Select all
<xsl:template name="insertBodyFirstFooter">
<fo:static-content flow-name="first-body-footer">
<fo:block xsl:use-attribute-sets="__body__odd__footer" text-align="right" space-after="10pt" start-indent="0pt" space-after.conditionality="retain">
<fo:inline/>
</fo:block>
</fo:static-content>
</xsl:template>
<xsl:template name="insertBodyOddFooter">
<fo:static-content flow-name="odd-body-footer">
<fo:block xsl:use-attribute-sets="__body__odd__footer" text-align="right" space-after="10pt" start-indent="0pt" space-after.conditionality="retain">
<fo:inline><fo:page-number/></fo:inline>
</fo:block>
</fo:static-content>
</xsl:template>
<xsl:template name="insertBodyEvenFooter">
<fo:static-content flow-name="even-body-footer">
<fo:block xsl:use-attribute-sets="__body__odd__footer" text-align="right" space-after="10pt" start-indent="0pt" space-after.conditionality="retain">
<fo:inline><fo:page-number/></fo:inline>
</fo:block>
</fo:static-content>
</xsl:template>
<xsl:template name="insertBodyLastFooter">
<fo:static-content flow-name="last-body-footer">
<fo:block xsl:use-attribute-sets="__body__odd__footer" text-align="right" space-after="10pt" start-indent="0pt" space-after.conditionality="retain">
<fo:inline/>
</fo:block>
</fo:static-content>
</xsl:template>
Regards,
GW