I have created a PDF report using these NodeJS libraries:
- node-html-pdf (node-html-pdf
- EJS
I have enabled the footer property in the node-html-pdf options object:
const options = {
// ... other properties
header: { "height": "40mm" },
}
The height for the header has been changed with different values, but a fixed/extra height is added. The following image shows the current state:
In the HTML template I have this code:
<div id="pageHeader-first" style="height: 0px !important; visibility: hidden;">Header on first page</div>
<div id="pageHeader" style="margin-top: 0px; padding-top: 0px; position: absolute; left: 60px;">
<table border="1" style="width: 900px">
<tr>
<td colspan="8">
<h4 class="negrilla text-center">Certificate</h4>
</td>
<td rowspan="2">
<div class="text-center"><img src="https://i.imgur.com/animage.png" width="80px"></div>
</td>
</tr>
<tr>
<td>Certificate</td>
<td>:</td>
<td>000212</td>
<td colspan="2"></td>
<td>Date</td>
<td>:</td>
<td>21-ene.-2022</td>
</tr>
</table>
</div>
Thanks in advance for your help.
