With DocumentData we are able to reposition shapes in PowerPoint.
This is useful when inserting data into shapes that risk overflowing and covering content below because of the textbox expanding.
We are currently only able to reposition shapes vertically, practically allowing to arrange the design into columns.
How to configure
In order to be able to reposition shapes using DocumentData, this config must be added to the JSON config in the Alt Text of the shapes in question:
Alt Text config
{
"RepositionShapeOptions" :{
"RepositionToShapeName": "Movable_A_1",
"RepositionOffsetValue" : 10
}
}
RepositionToShapeName
defines the name of the shape that that you want to reposition relative to. It is suggested to use naming of movable shapes as indicated in below image.
The callouts in this image indicate the shape names of each movable shape. In this example, the slide has been divided into three columns: A, B and C. For each column, the topmost shape will be the static one, and the below shapes will reposition according to the height of the shape above, meaning that shapes _2
in each column will reposition according to shape _1
, shape _3
will position to shape _2
and so on. Thus, the value in the Alt Text of the shape, must be set to the shape name for that shape above. For the static shapes, marked with_1
, the value must be null
.
RepositionOffsetValue
the value of the offset to the above shape. Value is in points.
All static shapes should be hidden in the selection view.
Example
This is an Alt Text example from a client's CVPartner integration:
{
"SkabelonDesign": {
"textualValue": "<key1/>",
"bindingCollection": {
"key1": {
"SkabelonDesign": {
"type": "Text",
"binding": "CVPartner.key_qualifications[0].long_description"
}
}
}
},
"RepositionShapeOptions" :{
"RepositionToShapeName": "Movable_B_1",
"RepositionOffsetValue" : 1
}
}
The name of the shape containing this Alt Text was "Movable_B_2".
Comments
0 comments
Article is closed for comments.