title: how add footer on html2pdf.js
body: <p>Tell me how to add a footer to each page using html2pdf.js
  [working version<a href="https://i.stack.imgur.com/wDTH3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wDTH3.png" alt="][1]" /></a></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>  function test() {
      // Get the element.
      var element = document.getElementById('the-document');
  
  
  
  
      // Generate the PDF.
      html2pdf().from(element).set({
        filename:  'test.pdf',
        image: {type: 'jpeg',quality: 1.0},
              html2canvas: {dpi: 75, scale: 2, letterRendering: true},
        pagebreak: { mode: ['avoid-all', 'css', 'legacy'] },
        jsPDF: {orientation: 'portrait', unit: 'in', format: 'a4', compressPDF: true},
        // pdfCallback: pdfCallback
      }).save();
  
    }</code></pre>
  </div>
  </div>
  </p>