Open VirajPoriya2202 opened 9 months ago
Hello, I'm facing the same issue when adding header elements to the generated PDF files. The simplest way I found was to add the header directly in the HTML and control it using the CSS @media property.
@media print {
#header {
position: fixed;
top: 0;
width: 100%;
}
}
Getting the same issue. Tried giving footer.html path as well as the footer_str. But still nothing is coming on the footer.
problem solved here: https://stackoverflow.com/questions/34274637/pdfkit-headers-and-footers pdfkit require .html files as header/footer, so making temp files will solve the problem it's not the perfect solution, but it's how it will make it work
Issue Description: I am using the
pdfkit
library to convert HTML content to a PDF file with specified header and footer HTML. However, the header and footer are not showing up in the generated PDF.Also, it is not working when I pass HTML local paths in 'header-html' and 'footer-html' options.Code Snippet: