0

We use the Google Drive REST API to export Google Sheets as PDF. We are NOT using Google Script.

https://developers.google.com/drive/v3/web/manage-downloads#downloading_google_documents

It works, but is there a way of specifying extra options, such as the paper orientation?

It is possible when using the Google Sheets app with the File > Download as menu.

Clement
  • 3,990
  • 4
  • 43
  • 44
  • Is this information useful for your situation? https://stackoverflow.com/questions/21997924/export-or-print-with-a-google-script-new-version-of-google-spreadsheets-to-pdf – Tanaike Apr 26 '18 at 00:07
  • No. This is not using the REST API. I did try adding a portrait=false query parameter with the REST API, but this had no effect. – Clement Apr 26 '18 at 03:54
  • I'm sorry for the inconvenience. I couldn't understand the situation about ``I did try adding a portrait=false query parameter with the REST API, but this had no effect.``. I'm sorry for my poor English skill. Can you show us the detail information that you tried? If you can do, please update your question. – Tanaike Apr 26 '18 at 04:13
  • If you issue GET https://www.googleapis.com/drive/v3/files/0B9jNhSvVjoIVM3dKcGRKRmVIOVU?alt=media&portrait=false the portrait parameter has no effect – Clement Apr 26 '18 at 07:37
  • see https://developers.google.com/drive/v3/web/manage-downloads#downloading_google_documents – Clement Apr 26 '18 at 07:37
  • @DaImTo this is not a duplicate. As mentioned in the title this is about the REST API, not Google Script – Clement Apr 26 '18 at 23:04
  • @DalmTo honestly this is not a duplicate can you fix this? – Clement May 08 '18 at 03:49

0 Answers0