Mark Harrison
Mark Harrison

Reputation: 304662

Programmatically download a Google Doc?

Google Docs have a "Download as..." menu option, with several choices of format such as PDF, text, etc.

How can I programmatically download a particular Google document?

Upvotes: 2

Views: 1265

Answers (1)

Wyetro
Wyetro

Reputation: 8588

From how to programmatically download a public Google Drive file?:

You don't need any Google SDK if you know the link and the file is public. Just use a standard HTTP GET method to download the file.

Example with AngularJS:

$http.get('/doc_url').
  then(function(response) {
    // this callback will be called asynchronously
    // when the response is available
  }, function(response) {
    // called asynchronously if an error occurs
    // or server returns response with an error status.
  });

Upvotes: 1

Related Questions