What's the Canvas Size?

The standard sizes are 1280×720 (16:9), 1024×768 (4:3) and 1080×1080 (1:1), but a deck built from a template carries that template's canvas. All element positions and dimensions are in pixels from the top-left corner.

The canvas size defines the coordinate space for your slides. Every element's position (x, y) and dimensions (width, height) are measured in pixels within this space. The canvas size is set when the deck is created and cannot be changed afterward.

Available Canvas Sizes

Aspect RatioWidthHeightCommon Use
16:91280 px720 pxStandard widescreen presentations (default)
4:31024 px768 pxTraditional presentations, some projectors
1:11080 px1080 pxSocial media, square format

If no aspect ratio is specified when creating a deck, it defaults to 16:9. Every deck is built from a template — the starter for that ratio if you name none — and takes its canvas from it, so read the actual dimensions with deck_get rather than assuming the standard size.

Coordinate System

  • Origin: top-left corner of the slide at (0, 0)
  • X axis: increases to the right (0 → canvas width)
  • Y axis: increases downward (0 → canvas height)
  • Units: all values are in pixels — no percentages, inches, or EMUs

Margin guidance

Leave at least 40–60 px of margin from the slide edges for breathing room. Don't fill every pixel — elements that touch the edges look cramped and may clip during export.

Setting the Aspect Ratio

The aspect ratio (and therefore canvas size) is set when you create a deck. Pass the aspectRatio parameter to deck_create or slide_bulk_create:

deck_create({
  name: "My Presentation",
  aspectRatio: "16:9"    // or "4:3" or "1:1"
})

// Response:
// {
//   deckId: "deck_abc123",
//   canvas: { width: 1280, height: 720 },
//   ...
// }

Once a deck is created, the canvas size is fixed — it cannot be changed. If you need a different aspect ratio, create a new deck.

Confirming the Canvas Size

Always call deck_get before placing elements. The response includes the canvas dimensions:

deck_get({ deckId: "deck_abc123" })

// Response includes canvas dimensions:
// {
//   canvas: { width: 1280, height: 720 },
//   aspectRatio: "16:9",
//   slides: [...],
//   ...
// }

This is especially important for imported template decks, which may have non-standard canvas sizes (see below).

Font Sizes vs. Element Positions

Two different unit systems are used:

  • Element positions and sizes (x, y, width, height) — pixels
  • Font sizes (fontSize) — points (e.g., 12pt for body, 24pt for headings, 36pt+ for titles)

Example

// Place a title near the top-left with 60px margins
element_create({
  slideId: "slide_xyz",
  type: "text",
  role: "title",
  text: "Quarterly Review",
  x: 60,        // 60px from left edge
  y: 60,        // 60px from top edge
  width: 600,   // 600px wide
  height: 80,   // 80px tall
  fontSize: 44  // 44 points (not pixels)
})

Imported Template Canvas Sizes

When you import a brand template (.potx or .potm) — or import a .pptx presentation — the deck preserves the original file's canvas dimensions. These may not match the standard sizes — for example, a PowerPoint template might use 960×540 or 1920×1080.

  • Imported dimensions are stored separately and take priority over the standard aspect ratio sizes
  • The template's layouts are copied at the imported canvas dimensions
  • Font sizes are scaled proportionally so text looks correct at the imported size
  • Always call deck_get to confirm the actual canvas size before positioning elements

Common Issues

  • Elements appearing off-screen or clipped: Check that your x + width ≤ canvas width and y + height ≤ canvas height. Call deck_get to confirm the actual dimensions.
  • Assumed 1280×720 but deck is a different size: Imported template decks can have non-standard canvas sizes. Never hardcode dimensions — always read them from deck_get.
  • Text looks too large or too small: Font sizes are in points, not pixels. A 44pt title will render correctly regardless of canvas size.
  • Want to change the aspect ratio: Canvas size is fixed at deck creation. Create a new deck with the desired aspect ratio and recreate your slides.

Related