title: jsPDF add footer to multiple pages
body: <p>Hi am a newbie using the jsPDF.  I can generate a new pdf file with multiple pages.   The problem is:  i want to put a footer on each page.  I have looked at multiple posts but still not sure how to approach.  Do i need to create the pages in an array and then put out the pages?   Is there an easier way to approach this?  Any help would be GREATLY appreciated.  Thank you in advance.
  Here is my function to date:</p>
  
  <pre><code>function printEngineeringNotice() {
        alert("In PDF.");
       var hubENNumber = document.getElementById('ennumber').innerText;
       var hubNumber = hubENNumber.substr(12);
       var hubDate = document.getElementById('enendate').getElementsByClassName('date-time-field-style')[0].value;
       var hubCustomer = document.getElementById('encustomer').getElementsByClassName('FormField')[0].value;
       var hubSummary = document.getElementById('summary').getElementsByClassName('FormFieldTextArea')[0].value;
       var hubDescription = document.getElementById('description').getElementsByClassName('FormFieldTextArea')[0].value;
       var lenDescription = hubDescription.length;
       var hubRev = document.getElementById('enrev').getElementsByClassName('FormField')[0].value;
       var hubDistribution = document.getElementById('distribution');
       var Cells = hubDistribution.getElementsByTagName('td');
       hubDist = (Cells[0].innerText);
  
       var hubAuthor = document.getElementById('enauthor').innerText;
       var hubAuth = hubAuthor.substr(9)
  
       varBottom = 'This Drawing.'
  
  
       var myWindow = window.open('','_blank','width=460px, height=287.5px');
       var a = myWindow.document.createElement("script");
       a.type = "text/javascript";
       a.src = "common/scripts/jquery.min.js";
       var b = myWindow.document.createElement("script");
       b.type = "text/javascript";
       b.src = "common/scripts/jspdf.debug.js";
       var c = myWindow.document.createElement("script");
       c.type = "text/javascript";
       c.src = "common/scripts/html2canvas.js";
       var d = myWindow.document.createElement("script");
       d.type = "text/javascript";
  
  
       d.text = "function printThis() { var pdf = new jsPDF('p', 'in', [11,8.5]),"
       + "margins = {top: 10, bottom: 10, left: 10};"
       + "var printArea = document.getElementById('PrintableTag');"
  
       + "pdf.addHTML(printArea, 0, 0, {pagesplit: true, retina: true, margin: {top: 100, right: 10, bottom: 100, left: 10, useFor: 'page'}},"
       + "function () {pdf.save('Customer.pdf')});"
       + "setTimeout( function() {window.close();}, 10000);} window.onload = printThis";
  
  
       var e = myWindow.document.createElement("script");
       e.type = "text/javascript";
  
       myWindow.document.write("&lt;head id = 'myScript'&gt;&lt;/head&gt;&lt;body id = 'PrintableTag'&gt;&lt;/body&gt;"
       + "&lt;style&gt;#Container {min-height:100%; position:relative; width:850px; margin-left: auto; margin-right: auto; height: 700px}&lt;/style&gt;"      
       + "&lt;div id='Container'&gt;"       
  
       + "&lt;table width = '1000px' cellspacing = '0' cellpadding = '4' style = 'border: 0px' align='center'&gt;"
       + "&lt;tr&gt;&lt;td&gt;&lt;table width = '850px' cellspacing = '0' cellpadding = '4' style = 'border: 0px' align='center'&gt;"
       + "&lt;tr&gt;&lt;td width = '150px' style = 'font-size: 20px'&gt;&lt;b&gt;&lt;center&gt;GE – Transportation&lt;/center&gt;&lt;/td&gt;&lt;/tr&gt;"
       + "&lt;tr&gt;&lt;td width = '150px' style = 'font-size: 20px'&gt;&lt;b&gt;&lt;center&gt;Systems Engineering&lt;/center&gt;&lt;/td&gt;&lt;/tr&gt;"
       + "&lt;tr&gt;&lt;td width = '150px' style = 'font-size: 20px'&gt;&lt;b&gt;&lt;center&gt;Engineering Notice&lt;/center&gt;&lt;/td&gt;&lt;/tr&gt;"
       + "&lt;tr&gt;&lt;td width = '150px' style = 'font-size: 20px'&gt;" + hubNumber + "&lt;b&gt;&lt;/td&gt;&lt;/tr&gt;"
       + "&lt;tr style:center&gt;&lt;td style:center&gt;&lt;center&gt;&lt;hr border: 3px solid black; width = '850px'&gt;&lt;/hr&gt;&lt;/center&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"
  
       + "&lt;tr&gt;&lt;td&gt;&lt;table width = '850px' cellspacing = '0' cellpadding = '4' style = 'border: 0px' align='center'&gt;"
       + "&lt;tr&gt;&lt;td width = '150px' style = 'font-size: 20px'&gt;&lt;b&gt;EN Number:&lt;/b&gt;&lt;/td&gt;&lt;td style = 'font-size: 20px'&gt;" + hubNumber + "&lt;/td&gt;&lt;/tr&gt;"
       + "&lt;tr&gt;&lt;td width = '150px' style = 'font-size: 20px'&gt;&lt;b&gt;Date:&lt;/b&gt;&lt;/td&gt;&lt;td style = 'font-size: 20px'&gt;" + lenDescription + "&lt;/td&gt;&lt;/tr&gt;"
       + "&lt;tr&gt;&lt;td width = '150px' style = 'font-size: 20px'&gt;&lt;b&gt;Customer:&lt;/b&gt;&lt;/td&gt;&lt;td style = 'font-size: 20px'&gt;" + hubCustomer + "&lt;/td&gt;&lt;/tr&gt;"
       + "&lt;tr&gt;&lt;td width = '150px' style = 'font-size: 20px'&gt;&lt;b&gt;Summary:&lt;/b&gt;&lt;/td&gt;&lt;td style = 'font-size: 20px'&gt;" + hubSummary + "&lt;/td&gt;&lt;/tr&gt;"
       + "&lt;tr&gt;&lt;td width = '150px' style = 'font-size: 20px'&gt; &lt;b&gt;&lt;u&gt;Distribution:&lt;/u&gt;&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;"
       + "&lt;tr&gt;&lt;td style = 'font-size: 20px' colspan='2'&gt;" + hubDist + "&lt;/td&gt;&lt;/tr&gt;"
       + "&lt;tr&gt;&lt;td width = '150px' style = 'font-size: 20px'&gt; &lt;b&gt;&lt;u&gt;Description:&lt;/u&gt;&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;"
       + "&lt;tr&gt;&lt;td style = 'font-size: 20px' colspan='2'&gt;" + hubDescription + "&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"
       + "&lt;style&gt;#myFooter {position:absolute; bottom:0; width:850px; height:60px; background:#6cf; vertical-align:bottom;  left: 15%;  margin-left: -50px;&gt;&lt;/style&gt;"  
       + "&lt;footer id='myFooter'&gt;"
       + "&lt;style&gt;#hubRow {border: 3px solid black;}&lt;/style&gt;"
       + "&lt;table border = '1' border-style: 'solid' width = '850px' align='center' id = 'hubRow'&gt;"
       + "&lt;tr&gt;&lt;td width = '150px' style = 'font-size: 20px'&gt;&lt;b&gt;Author:&lt;/b&gt;&lt;/td&gt;&lt;td style = 'font-size: 20px'&gt;" + hubAuth + "&lt;/td&gt;"
       + "&lt;td width = '150px' style = 'font-size: 20px'&gt;&lt;b&gt;Approver:&lt;/b&gt;&lt;/td&gt;&lt;td style = 'font-size: 20px'&gt;" + hubAuth + "&lt;/td&gt;&lt;/tr&gt;"
       + "&lt;tr&gt;&lt;td width = '150px' style = 'font-size: 20px'&gt;&lt;b&gt;Issued:&lt;/b&gt;&lt;/td&gt;&lt;td style = 'font-size: 20px'&gt;Get Engineering&lt;/td&gt;"
       + "&lt;td width = '150px' style = 'font-size: 20px'&gt;&lt;b&gt;Bus. Area:&lt;/b&gt;&lt;/td&gt;&lt;td style = 'font-size: 20px'&gt;LO&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"
       + "&lt;table width = '850px' cellspacing = '0' cellpadding = '4' style = 'border: 0px' align='center'&gt;"
       + "&lt;tr&gt;&lt;td width = '850px' style = 'font-size: 10px'&gt;" + varBottom + "&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"
       + "&lt;/footer&gt;&lt;/div&gt;"
       + "&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;")
  
  
       myWindow.document.getElementById('myScript').appendChild(a);                                                                                                                                                                                                                                                                                                                                                                                    
       myWindow.document.getElementById('myScript').appendChild(b);
       myWindow.document.getElementById('myScript').appendChild(c);
       myWindow.document.getElementById('myScript').appendChild(d);
       myWindow.document.getElementById('myScript').appendChild(e);
       myWindow.document.close();
    }
  </code></pre>