class SlidesApp method .getPageWidth()

SlidesApp is the Apps Script service.

.getPageWidth() is the method name you will see after a dot in your code.

What it does

Returns the width of a slide in points.

Why it's used

  • Position shapes or images with correct proportions.
  • Layout custom graphics that need to fit the slide.

Common errors

  • Forgetting parentheses on getPageWidth. Write SlidesApp.getPageWidth(), not SlidesApp.getPageWidth or getPageWidth by itself.
  • Skipping dots between chained calls. Each step needs a dot, like SlidesApp.getPageWidth().
  • Adding spaces where they do not belong. Write SlidesApp.getPageWidth(), not SlidesApp .getPageWidth(), SlidesApp.getPageWidth (), or SlidesApp . getPageWidth().
  • Wrong capitalization. Use SlidesApp and getPageWidth, not slidesapp or getpagewidth.

Explore

Related methods

Better Sheets tutorials

No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.

Related blog posts

Written guides about SlidesApp.getPageWidth().

Browse the blog