I'm trying to just copy the first example (the title part), where is my mistake?
- I don't see any change.
- I put debugger in the handlebar file and it doesn't stop.
const result = await jsreport.render({
template: {
content:this.contnet,
engine: 'handlebars',
recipe: 'chrome-pdf',
chrome: {
displayHeaderFooter: true,
headerTemplate: `
<html>
<head>
<style>
* {
box-sizing: border-box;
}
html, body {
margin: 0px;
padding: 0px;
}
.main {
display: flex;
flex-direction: column;
justify-content: space-between;
width: 100%;
height: 100%;
}
.header {
width: 100%;
padding-top: 20px;
border-bottom: 1px solid black;
}
.footer {
width: 100%;
padding-bottom: 20px;
border-top: 1px solid black;
}
</style>
</head>
<body>
{{#each $pdf.pages}}
{{#if 0}}
<div style="page-break-before: always;"></div>
{{/if}}
<main class="main">
<header class="header">
Header
</header>
<footer class="footer">
<span>Page {{getPageNumber 0}} of {{getTotalPages ../$pdf.pages}}</span>
</footer>
</main>
{{/each}}
</body>
</html>`
},
helpers:this.helper,
},
data: this.data
})