Dec 11, 2017 - As pointed out here: To 'Save as PDF' instead of 'Download as PDF', one should: File > Print; Change destination to Google Drive.

I've been trying to convert a Google Docs file to a PDF file without having to use the download option. Below is the script I have used in the Script Editor but it doesn't seem to work. I think the error is after the IF statement.

Save as pdf in chrome
  1. Once opened in Google Docs, click the “File” menu within GDocs and choose “Download as” followed by “Microsoft Word 97-2003 (.doc)” to convert the origin file to a DOC The converted PDF file will download as a new DOC file from the browser.
  2. Jul 26, 2016 - My problem is, though, how can I export the excel sheets to PDF while. Excel file to Google Sheets format and then download it as a PDF.
Download
Robert PriestRobert Priest

2 Answers

Download Google Drive Pdf

It is failing because the folder is not defined. If you replace it with DriveApp, the PDF will be created in the root folder and your function would work. You can also show the full URL in the message box.

Amit AgarwalAmit Agarwal

To save the PDF in the original directory:

Pdf

And add this generic function

Stefan van AalstStefan van Aalst

Tutorial Google Docs 2016

Not the answer you're looking for? Browse other questions tagged pdfgoogle-apps-scriptgoogle-docs or ask your own question.