Tags

By using tags you can replace a tag on a shape with your own value

Placing text surrounded by curly braces in your template creates a tag. This enables you to replace that text using tagging.

Tagging can be done at either slide or whole presentation level.

Tagging at slide level

Provide a list of 'Key' and 'Value' for each slide and PowerPoint Generator API will replace all the relevant tags on that slide.

{
  "presentation": {
    "template": "slides_as_template_tagging.pptx",
    "export_version": "Pptx2010",
    "slides": [
      {
        "type": "slide", 
        "slide_index": 0,
        "shapes": [],
        "tags": [
          {
            "key": "client",
            "value": "Your favourite client"
          },
          {
            "key": "date",
            "value": "09/09/2021"
          }
        ]  
      },
      {
        "type": "slide",
        "slide_index": 1, 
        "shapes": [],
        "tags": [          
          {
            "key": "product",
            "value": "PowerPoint Generator API"
          },
          {
            "key": "adjective",
            "value": "frustrating"
          }
        ]
      }
    ]
  }
}

Tagging at presentation level

Provide a list of 'Key' and 'Value' for the whole presentation within your "presentation" object. Then PowerPoint Generator API will replace all the relevant tags on the whole presentation.

If your presentation is very large and you have a significant number of tags, tagging at a presentation level may slow the application. If you are encountering performance problems, consider using tagging at a slide level.

{
  "presentation": {
    "template": "slides_as_template_tagging.pptx",
    "export_version": "Pptx2010",
    "tags": [
      {
        "Key": "client",
        "Value": "Your favourite client"
      },
      {
        "Key": "date",
        "Value": "09/09/2021"
      },
      {
        "Key": "product",
        "Value": "PowerPoint Generator API"
      },
      {
        "Key": "adjective",
        "Value": "frustrating"
      }
    ],
    "slides": [
      {
        "type": "slide", 
        "slide_index": 0,
        "shapes": []
      },
      {
        "type": "slide",
        "slide_index": 1, 
        "shapes": []
      }
    ]
  }
}

Tagging is currently only available on text boxes

Last updated