title: Creating PDF from HTML background color in the PDF
body: <p>I have seen several similar questions regarding creating PDF from Blob with examples of colored backgrounds, but none of the answers address the "Background color issue" and I can't get the resulting PDF to have any background color.</p>
  
  <p>I followed this example (<a href="https://stackoverflow.com/questions/43941270/create-pdf-from-html-in-google-apps-script-and-include-images-images-not-showi?r=SearchResults&amp;s=1|145.0444">Create PDF from HTML in Google Apps Script and include images - Images not showing up</a>) and got the image to be included in the pdf, but the background colors are not in the pdf.</p>
  
  <pre><code>function htmlToPDF() {
  
    var html = "&lt;h1&gt;Hello world&lt;/h1&gt;"
         + "&lt;p&gt;This is just a paragraph"
         + "&lt;p style='color:red;'&gt;I am red&lt;/p&gt;"
         + "&lt;p style='color:blue;'&gt;I am blue&lt;/p&gt;"
         + "&lt;p style='font-size:50px;'&gt;I am big&lt;/p&gt;"
         + "&lt;table style='border-collapse: collapse; width: 698px; height: 115px; background-color: #C5D9F1;' border='0' cellpadding='10'&gt;"
         + "&lt;tbody&gt;"
         + "&lt;tr&gt;"
         + "&lt;td style='padding: 5px;background-color:powderblue;' nowrap='nowrap'&gt;&lt;strong&gt;Bold with background-color:&lt;/strong&gt;&lt;/td&gt;"
         + "&lt;/tr&gt;"
         + "&lt;/tbody&gt;"
         + "&lt;/table&gt;";
  
    var blob = Utilities.newBlob(html, "text/html", "text.html");
    var pdf = blob.getAs("application/pdf");
  
    DriveApp.createFile(pdf).setName("text.pdf");
  
    MailApp.sendEmail("[your email here ]", "PDF File", "", 
       {htmlBody: html, attachments: pdf});
  }
  </code></pre>
  
  <p>Font colors are correct, but no background color</p>