Home > Back-end >  HTML to Image from Google Sheets to Google Drive on Google Apps Script
HTML to Image from Google Sheets to Google Drive on Google Apps Script

Time:12-08

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: enter image description here

  • 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);
    
  • References:

    • Related