google-apps-scriptgoogle-drive-apipdf-generationexport-to-pdf

Export a document as a PDF via app script api


Is there a way to export / serve a document as a PDF via the API in google app script?

I know there exists a download as pdf option, but I am not looking for that. I am looking to create a PDF document in google drive via the app script API.


Solution

  • Yes. Try the File.getAs() method