We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I see that htmlpdfchrome has this option with:
const pdf = await htmlPdf.create(html, { port, printOptions: { displayHeaderFooter: true, headerTemplate: ` <div class="text center"> Page <span class="pageNumber"></span> of <span class="totalPages"></span> </div> `, footerTemplate: '<div class="text center">Custom footer!</div>', }, });
Can I do this on pdf-bot generation?
The text was updated successfully, but these errors were encountered:
You can just pass printOptions directly to generator section. i.e.
var htmlPdf = require('html-pdf-chrome') module.exports = { api: { token: 'api-token' }, // html-pdf-chrome options generator: { completionTrigger: new htmlPdf.CompletionTrigger.Timer(5000), // waits for 5 sec, printOptions: { displayHeaderFooter: true, headerTemplate: ` <div class="text center"> Page <span class="pageNumber"></span> of <span class="totalPages"></span> </div> `, footerTemplate: '<div class="text center">Custom footer!</div>', } }, webhook: { secret: '1234', url: 'http://localhost:3000/webhooks/pdf' } }
Sorry, something went wrong.
No branches or pull requests
I see that htmlpdfchrome has this option with:
Can I do this on pdf-bot generation?
The text was updated successfully, but these errors were encountered: