title: How to record page numbers html-pdf node.js?
body: <p>I'm using html-pdf for node.js to create a pdf from html. Built into html-pdf is the ability to add page numbers to the footers. I want to record those page numbers somehow, maybe in an array. This is my current code:</p>
  
  <pre><code>let index = 0;
  let myIndex = [];
  
  &lt;div id="pageHeader" style="text-align: center; padding-top: 30px;"&gt;&lt;/div&gt;
                  &lt;body class='page'&gt;      
                      ${myHtmlText} 
                  &lt;/body&gt;
  &lt;div id="pageFooter" style="text-align: center; font-size: 12px;"&gt;{{page}}&lt;/div&gt;
  </code></pre>
  
  <p>{{page}} within the pageFooter div automatically increases the page number by 1 each new page. How do I record the value of the page numbers in a variable?</p>