PD4ML provides 3 types of headers/footers.
- text-only
- html (PD4ML Pro)
- inline (PD4ML Pro)
The first 2 options are available by PD4ML Java API calls (or as JSP custom tags mapped to PD4ML API): i.e.
<pd4ml:footer> ->
pd4ml.setPageFooter(); 1. Text only (in such form can be used only in JSP):
<pd4ml:footer
pageNumberTemplate="page $[page] of $[total]"
titleAlignment="left"
pageNumberAlignment="right"
color="#008000"
initialPageNumber="1"
pagesToSkip="1"
fontSize="14"
areaHeight="18"/> 2. HTML formatted footer (in such form can be used only in JSP)
<pd4ml:footer areaHeight="-1"><font color="red"><i>page $[page] of $[total]</i></font></pd4ml:footer>
areaHeight="-1" means
"autocompute" there
3. The third option, inline footer, allows to define footer body in HTML/PHP document:
<pd4ml:page.footer>
footer: $[page] of $[total]
</pd4ml:page.footer>
The definition impacts all subsequent pages after the page, where the footer defined. A new appearance of the footer overrides previously defined one.
In order to define the footer for the first page, you need to place the definition immediately after <body> tag or before <html>.
Also you may explicitly define pages, where the footer needs to be applied:
<pd4ml:page.footer scope="1">
first page footer: $[page] of $[total]<br> <img src="img1.gif">
</pd4ml:page.footer>
<pd4ml:page.footer scope="2+">
footer: $[page] of $[total]<br>
<img src="img2.gif">
</pd4ml:page.footer>
<html>
<head>
...
The above defines different footers for the first page and for the rest of the pages (the second and others). Also "scope" understands "even", "odd" and "skiplast" modifiers. Example:
scope="2,5-10,even,skiplast"
PD4ML provides 3 types of headers/footers.
[list=1]
[*]text-only
[*]html (PD4ML Pro)
[*]inline (PD4ML Pro)[/list]
The first 2 options are available by PD4ML Java API calls (or as JSP custom tags mapped to PD4ML API): i.e.
[b]<pd4ml:footer>[/b] -> [b]pd4ml.setPageFooter();[/b]
1. Text only (in such form can be used only in JSP):
[language=xml]<pd4ml:footer
pageNumberTemplate="page $[page] of $[total]"
titleAlignment="left"
pageNumberAlignment="right"
color="#008000"
initialPageNumber="1"
pagesToSkip="1"
fontSize="14"
areaHeight="18"/>[/language]
2. HTML formatted footer (in such form can be used only in JSP)
[language=xml]<pd4ml:footer areaHeight="-1"><font color="red"><i>page $[page] of $[total]</i></font></pd4ml:footer>[/language]
[b]areaHeight="-1"[/b] means [b]"autocompute"[/b] there
3. The third option, inline footer, allows to define footer body in HTML/PHP document:
[language=xml]<pd4ml:page.footer>
footer: $[page] of $[total]
</pd4ml:page.footer>[/language]
The definition impacts all subsequent pages after the page, where the footer defined. A new appearance of the footer overrides previously defined one.
In order to define the footer for the first page, you need to place the definition immediately after <body> tag or before <html>.
Also you may explicitly define pages, where the footer needs to be applied:
[language=xml]<pd4ml:page.footer scope="1">
first page footer: $[page] of $[total]<br> <img src="img1.gif">
</pd4ml:page.footer>
<pd4ml:page.footer scope="2+">
footer: $[page] of $[total]<br>
<img src="img2.gif">
</pd4ml:page.footer>
<html>
<head>
...[/language]
The above defines different footers for the first page and for the rest of the pages (the second and others). Also "scope" understands "even", "odd" and "skiplast" modifiers. Example:
[b]scope="2,5-10,even,skiplast" [/b]