page number disappeared after adding header HTML in HTMLtoPDF

 Hi Guys, after adding this input in the otherArgs parameter, the page number does not display.

However when I remove the header html parameter in otherArgs, the page number redisplays. Any idea why does it happen when adding a header in the pdf file? when i have specified the WhereToAddPageNumber in the footer section.
 
Hi,

since it's a third party component and actually does notthing itself.
just passing parameters to the commandline, try to debug it on the command line first.



 How do I debug it from the command line? I am only calling the HTMLtoPDFConverter function then pass the parameters from the screenshot above.
well, just call wkhtmltopdf.exe directly.


  No luck, when i execute wkhtmltopdf.exe, it automatically closes. I cannot debug it.

 I was able to resolve this using the code in the wkhtmltopdf page, it seems that when i add a footer html, the WhereToAddPageNumber parameter is being overwritten: This is what I included in the footer html:

<html><head><script>
  function subst() {
    var vars={};
    var x=window.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]];
    }
  }
  </script></head><body style="border:0; margin: 0;" onload="subst()">
  <table style="border-bottom: 1px solid black; width: 100%">
    <tr>
      <td class="section"></td>
      <td style="text-align:right">
        Page <span class="page"></span> of <span class="topage"></span>
      </td>
    </tr>
  </table>
  </body></html>