Is there a way to save a Google Slides as PDF file by using Google Apps Script?
I could only find solutions for saving Google Docs and Sheets.
How about this sample script? When Google Docs (Spreadsheet, Document and Slide) is saved and/or downloaded using DriveApp.createFile()
, the file format automatically becomes PDF. So we can use the following script.
var blob = DriveApp.getFileById("### Slide file ID ###").getBlob();
DriveApp.createFile(blob);
In this case, the filename of created PDF file is the same to the slide.
If you want to copy the slide file, please use a following script.
var file = DriveApp.getFileById("### Slide file ID ###");
file.makeCopy(DriveApp.getFolderById("### Destination folder ID ###"));