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!
We’re a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.