html_to_pdf
Generate simple PDF invoice from HTML using puppeteer & handlebars
Introduce
Puppeteer
Puppeteer is N...
For further actions, you may consider blocking this person and/or reporting abuse
The
data: text/html
trick is cool to avoid having to serve the final HTML to Chrome. I guess if images were involved you'd need to start serving the files from somewhere though.I recently wrote up a bit of an overview of various ways you can use Chrome headless for PDF conversion here.
Thanks for your reply :)
With images, we can convert to base64 and embed to HTML. No need start serving the files from somewhere
Oh yeah, that's clever too!