2

I have created a PDF file from Google Doc as

var pdf = DriveApp.getFileById(myGoogleDoc).getAs("application/pdf")

Now I want to get the link of this PDF file, so anyone can click on that link and download the file.

tehhowch
  • 9,645
  • 4
  • 24
  • 42
Gela Ram
  • 531
  • 1
  • 8
  • 14
  • 2
    from what I know you need to create a file in the drive then grab the url you can also go check [this post](https://stackoverflow.com/questions/44457298/building-link-to-export-sheet-as-pdf) – JSmith Sep 29 '18 at 21:00

1 Answers1

1

You can use the getUrl() method to get get the url of the file to open it with Google App like Drive PDF Viewer ,Google Docs ,etc.

Drive PDF Viewer will be used to open your converted PDF in Google Drive.

Refer To:Search for getUrl() on this page

You can even get the url of a folder to open it in drive or other Google App.

Sheetal gupta
  • 191
  • 1
  • 10