Download a Google Sheets spreadsheet as landscape PDF file

:bullseye: What is your goal?

We are trying to download a Google Sheets spreadsheet as a PDF file — but the catch is that we want the PDF file to be in landscape mode instead of portrait mode.

:thinking: What is the problem & what have you tried?

We have successfully used the advanced settings of the Google Drive “Download a File” module to download our Google Sheets spreadsheet as a PDF file, but it is showing up in portrait mode instead of landscape mode. Is there any way to get this PDF to generate in landscape mode?

You can use this url:

https://docs.google.com/spreadsheets/d/YOUR_SPREADSHEET_ID/export?format=pdf&portrait=false

Or a more verbose one:

https://docs.google.com/spreadsheets/d/YOUR_SPREADSHEET_ID/export?format=pdf&portrait=false&size=7&fitw=true&gridlines=false&gid=YOUR_SHEET_GID

Feed that to a HTTP Download a File module and make sure the sheet is shared to everyone with a link.

Thanks for the ideas, @Stoyan_Vatov!

What I failed to mention in my original post is that I previously tried both of those URLs, but Google always requires a login in order to download those PDFs, even after generating a share link with “reader/anyone” privileges.

(Additionally, these spreadsheets are generated from Make using the “create a spreadsheet from a tempoate” module, so they always start off by default with restricted privileges because that’s how Google’s API handles new spreadsheets.)

I was able to figure this out with the help of Make’s support team.

It looks like I was required to use the legacy “HTTP - Get a File” module (v3 of the HTTP module) instead of the new “HTTP - Download a File” module (v4 of the HTTP module).

I’m not sure what the difference is between these 2 modules, but I’m glad that it works!

Below are the screenshots of how to set this up: