Search code examples
google-apps-scriptgoogle-slides-api

Is there a known way to update the page setup size In the Google Slides API?


I've been poking around in the Google Slides API documentation. I can only find a way to update the element sizes. What I want to do is update the page setup size to widescreen 16:10.

I looked at this documentation and this but this just references page elements, not the slide its self. Is there any preferred or suggested way to go about doing this?


Solution

  • Those are links to the Google Apps Script Slides Service documentation (known as a built-in service). It gives you access to some features of the Google Slides API but not all. What you need is the advanced slides service, which is a direct analog of the Google Slides API. To use them effectively read the Advanced Google Services guide for more information.

    You can set the page size of a presentation when its created using the Advanced Service (see reference documentation). However your presentation may be letter-boxed (top and bottom padded with black boxes) if your presentations have a high width-to-height ratio.