2

I am using node-html-pdf to convert the html to PDF.The conversions are really good.But the problem is to add header and footer in the PDF pages.Actually i need Header and footer starting from second page to last page..is there any way to possible this?

   var options = {
    "format": 'Letter',
    "orientation": "portrait",
    "header": {
    "contents": {
                default:    `<div id="pageHeader">Default header</div>`
            }
  },
  "footer": {
    "contents": footer
  }
}
pdf.create("<div>Hi hello</div>", options).toFile("sample.pdf", function(err, res) {
        if (err) {
                console.error(err);
                callback();
        } 
});
user7075128
  • 21
  • 1
  • 5

0 Answers0