I'm trying convert html to image and save this to Google Drive. I can't find example on this site, then I ask the question.
I forming html text on script and send this to email. It looks like this:
In this sample script, the image size is setDimensions(600, 300)
. So please modify this for your actual situation.
For example, if you want to save the HTML table as a PDF file, please modify img
as follows.
const img = Utilities.newBlob(html, MimeType.HTML).getAs(MimeType.PDF);