Page 1 of 1

Dividing parts of a footer with a horizontal rule

Posted: Tue Jul 08, 2014 2:09 am
by gwhite
I need to add a horizontal rule in my PDF footers that separates a legal statement from information about the company. The solution that occurs to me starts with adding a second variable for each footer "type" declared in the ..Customization/common/vars/en.xml file, as in:

<variable id="Body odd footer">Legal text</variable>
<variable id="Body odd footer2">Address text</variable>

I would create additional footer templates in the static-content.xsl file (or in custom.xsl in the Customization folder), as in:

<xsl:template name="insertBodyOddFooter">
<fo:static-content flow-name="odd-body-footer">
<fo:block xsl:use-attribute-sets="__body__odd__footer">
etc, etc, etc
........

<xsl:template name="insertBodyOddFooter2">
<fo:static-content flow-name="odd-body-footer">
<fo:block xsl:use-attribute-sets="__body__odd__footer">
etc, etc, etc

But even with this much, assuming it might work, I can't think how to add the horizontal rule between the two parts. (I know a horizontal rule in html can be inserted with the <hr> statement. Maybe it applies here as well.)

Am I on the right track or overthinking the problem?

Gary

Re: Dividing parts of a footer with a horizontal rule

Posted: Mon Jul 14, 2014 5:00 pm
by sorin_ristache
Hello,

I think adding one or maybe two new variables like the existing ones called 'Body odd footer' and 'Body even footer', which you already found in the common/vars/en.xml file, should work. You should insert the content of a variable in the footer of the document as the content of the 'Body odd footer' variable is inserted, by calling the "insertVariable" template.

The horizontal line can be created with a fo:leader element that precedes the content of your additional custom variable.


Regards,
Sorin