It does sound very cool, but I don't think it exports to PDF: https://github.com/bubkoo/html-to-image/issues/327

Oh my, you're right. I've actually only tried it for exporting to images. Sorry for the misleading comment!