Change shape size and position

To change the size and position of a shape(text box, image, table, charts, etc)

  1. Select the shape by name you want to modify. See here to find shape names.

  2. Insert relevant size or position settings into settings object

  3. Set the desire shape size height weight & position top left using a JSON payload

  4. Specify the unit unit

Reference: shapes

Download: input.zip | output.pptx


{
  "presentation": {
    "template": "template.pptx",
    "export_version": "Pptx2010",
    "slides": [
      {
        "type": "slide",
        "slide_index": 0,
        "shapes": [
          {
            "name": "Rectangle 1",
            "settings": {
              "height": 5,
              "width": 9,
              "top": 8.5,
              "left": 15.25,
              "unit": "cm"
            }
          }
        ]
      }
    ]
  }
}

Last updated

Was this helpful?