Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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);
Add Comment
Please, Sign In to add comment