我想HTML电子邮件转换为PDF。 我写了下面的一段代码。
var txt = msgs[i].getBody();
/* We need two blob conversions - one from text to HTML and the other from HTML to PDF */
var blob = Utilities.newBlob(txt, 'text/html',"Test PDF");
Logger.log(txt);
var tempDoc = DocsList.createFile(blob);
var pdf = tempDoc.getAs('application/pdf');
pdf.setName('Email As PDF');
DocsList.createFile(pdf);
上述片的代码首先创建的Blob出从Gmail消息的HTML并使用getAs()函数将其转换为PDF。 然而,在HTML图像不是在PDF中找到。 如何获得这些图像的任何想法,将不胜感激。 关于如何将Gmail邮件转换为PDF任何其他的想法,也欢迎。