Adding header to all page except the first page
I need to add a page header to all the pages except the first page. I have it showing on all pages but was wondering if there is a way to hide it on the first page.
response/ comment shows how one could do this.
-
bcdvkp commented
fvlhHy <a href="http://lpxqgpkntwkw.com/">lpxqgpkntwkw</a>, [url=http://wwkzoexkpgjy.com/]wwkzoexkpgjy[/url], [link=http://aqlimcicukjx.com/]aqlimcicukjx[/link], http://elzftbyxkdtl.com/
-
pdfmyurl commented
Here is a psuedo code example:
To use the header (which has Args, pass them in as "?variable1=value1&variable2=value2" format on the end of the URL to the pdf-header URL
Here's the header:
<html><head><script>
function subst() {
var vars={};
var x=document.location.search.substring(1).split('&');
for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
var x=['date','ReportName'];var str = vars['ReportName'].replace(/_/g,' '); /* I needed this to clean up spaces */
vars['ReportName'] = str;for(var i in x) {
var y = document.getElementsByClassName(x[i]);
for(var j=0; j<y.length; ++j){
y[j].textContent = vars[x[i]];
}
/* if this is the first page, just remove the header element from the Document */
if(vars['page'] == 1){
var elt = document.getElementById("pdfHeader");
elt.parentNode.removeChild(elt);
}
}
}
</script></head><body style="border:0; margin: 0;" onload="subst()" bgcolor="#ffffff">
<table id=pdfHeader style="border-bottom: 1px solid black; width: 100%">
<tr>
<td style="text-align:left"><span class="date"></span></td>
<td align=right><span class="ReportName"></span></td>
</tr>
</table>
</body></html>And the Footer:
<html><head><script>
function subst() {
var vars={};
var x=document.location.search.substring(1).split('&');
for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];for(var i in x) {
var y = document.getElementsByClassName(x[i]);
for(var j=0; j<y.length; ++j){
y[j].textContent = vars[x[i]];
}
/* if this is the first page, just remove the footer element from the Document */
if(vars['page'] == 1){
var elt = document.getElementById("pdfFooter");
elt.parentNode.removeChild(elt);
}
}
}
</script></head><body style="border:0; margin: 0;" onload="subst()" bgcolor="#ffffff">
<table id=pdfFooter style="border-top: 1px solid black; width: 100%">
<tr>
<td align=left><a href="http://www.ourUrl.com/">http://www.ourUrl.com/</a></td>
<td style="text-align:center">
Page <span class="page"></span> of <span class="topage"></span>
</td>
<td align=right><img src="logo-small.jpg"/></td>
</tr>
</table>
</body></html>