javascript - Saving PDF "Blobs" in Google Scripts -
i'm trying populate folder list of pdf documents i've created using google scripts. when obtain pdf file, guess "blob", can't find functionality move file specified folder. this:
var temp = target.getas("application/pdf"); var targetfolder = docslist.getfolder(target_folder); temp.addtofolder(targetfolder);
unfortunately addtofolder not thing. there anyway accomplish this? thanks!
the folder object has createfile() method takes blob argument.
use :
var temp = target.getas("application/pdf"); var targetfolder = docslist.getfolderbyid('0b3qs__folder id____dsmtfzmdq') targetfolder.createfile(temp);// create pdf file straight in folder
javascript pdf google-apps-script
No comments:
Post a Comment