customizeElementStyles
- getTemplateVariables
- getTemplateVariablesType
- processTemplate
- removeVariableAudio
- removeVariableImage
- removeVariableText
- removeVariableVideo
- replaceVariableAudio
- replaceVariableHtml
- replaceVariableImage
- replaceVariableList
- replaceVariablePptxFragment
- replaceVariableTable
- replaceVariableText
- replaceVariableVideo
- setTemplateSymbol
customizeElementStyles
PREMIUM
TRIAL / ADVANCED
Changes elements styles on the fly in the PowerPoint presentation.
referenceNode
An array to get the refence node.
The possible keys and values of this array are:
| key | Type | Description |
|---|---|---|
| target | string |
|
| type | string |
|
| contains | string | Contains a text string. For paragraph, run, shape, table, table-row, table-cell, table-cell-paragraph types. |
| occurrence | mixed |
|
| attributes | array | Contains a specific attribute key and value. Node or descendant attributes |
| parent | string | Immediate children (default as '/', any parent) or any other parent (a:tbl/, p:sp/...). |
| rootParent | string | Root parent. Default as p:spTree for slide elements and p:presentation for presentation elements. |
| customQuery | string | Custom XPath query, overwrites any other reference. |
options
Changes to be applied.
audio elements
| Key | Type | Description |
|---|---|---|
| coordinateX | int | EMUs (English Metric Unit) |
| coordinateY | int | EMUs (English Metric Unit) |
| name | string | internal name |
| sizeX | int | EMUs (English Metric Unit) |
| sizeY | int | EMUs (English Metric Unit) |
chart elements
| Key | Type | Description |
|---|---|---|
| coordinateX | int | EMUs (English Metric Unit) |
| coordinateY | int | EMUs (English Metric Unit) |
| name | string | internal name |
| sizeX | int | EMUs (English Metric Unit) |
| sizeY | int | EMUs (English Metric Unit) |
diagram elements
| Key | Type | Description |
|---|---|---|
| coordinateX | int | EMUs (English Metric Unit) |
| coordinateY | int | EMUs (English Metric Unit) |
| name | string | internal name |
| sizeX | int | EMUs (English Metric Unit) |
| sizeY | int | EMUs (English Metric Unit) |
image elements
| Key | Type | Description |
|---|---|---|
| coordinateX | int | EMUs (English Metric Unit) |
| coordinateY | int | EMUs (English Metric Unit) |
| name | string | internal name |
| sizeX | int | EMUs (English Metric Unit) |
| sizeY | int | EMUs (English Metric Unit) |
paragraph elements
| Key | Type | Description |
|---|---|---|
| align | string | left, center, right, justify, distributed |
| bold | bool | |
| characterSpacing | int | |
| color | string | HEX color |
| font | string | Arial, Times New Roman ... |
| fontSize | int | 8, 9, 10, 11 ... |
| highlight | string | HEX color |
| indentation | int | EMUs (English Metric Unit) |
| italic | bool | |
| lang | string | |
| lineSpacing | int|float | 1, 1.5, 2... |
| marginLeft | int | EMUs (English Metric Unit) (0 >= and <= 51206400) |
| marginRight | int | EMUs (English Metric Unit) (0 >= and <= 51206400) |
| rtl | bool | |
| spacingAfter | int | points (0 >= and <= 158400) |
| spacingBefore | int | points (0 >= and <= 158400) |
| strikethrough | bool | |
| underline | string | single |
run elements
| Key | Type | Description |
|---|---|---|
| bold | bool | |
| characterSpacing | int | |
| color | string | HEX color |
| font | string | Arial, Times New Roman ... |
| fontSize | int | 8, 9, 10, 11 ... |
| highlight | string | HEX color |
| italic | bool | |
| lang | string | |
| strikethrough | bool | |
| underline | string | single |
shape elements
| Key | Type | Description |
|---|---|---|
| coordinateX | int | EMUs (English Metric Unit) |
| coordinateY | int | EMUs (English Metric Unit) |
| fillColor | string | HEX color |
| name | string | internal name |
| sizeX | int | EMUs (English Metric Unit) |
| sizeY | int | EMUs (English Metric Unit) |
table elements
| Key | Type | Description |
|---|---|---|
| backgroundColor | string | HEX color |
| columnWidths | int|array | column width fix (int) or column width variable (array). EMUs (English Metric Unit) |
| coordinateX | int | EMUs (English Metric Unit) |
| coordinateY | int | EMUs (English Metric Unit) |
| name | string | internal name |
| sizeX | int | EMUs (English Metric Unit) |
| sizeY | int | EMUs (English Metric Unit) |
table-row elements
| Key | Type | Description |
|---|---|---|
| backgroundColor | string | HEX color |
| height | int | EMUs (English Metric Unit) |
table-cell elements
| Key | Type | Description |
|---|---|---|
| backgroundColor | string | HEX color |
| textDirection | string | horz, vert, vert270, wordArtVert, eaVert, mongolianVert, wordArtVertRtl |
| verticalAlign | string | top, middle, bottom, topCentered, middleCentered, bottomCentered |
table-cell-paragraph elements
| Key | Type | Description |
|---|---|---|
| align | string | left, center, right, justify, distributed |
| bold | bool | |
| characterSpacing | int | |
| color | string | HEX color |
| font | string | Arial, Times New Roman ... |
| fontSize | int | 8, 9, 10, 11 ... |
| highlight | string | HEX color |
| indentation | int | EMUs (English Metric Unit) |
| italic | bool | |
| lang | string | |
| lineSpacing | int|float | 1, 1.5, 2... |
| marginLeft | int | EMUs (English Metric Unit) |
| rtl | bool | |
| spacingAfter | int | points (0 >= and <= 158400) |
| spacingBefore | int | points (0 >= and <= 158400) |
| strikethrough | bool | |
| underline | string | single |
video elements
| Key | Type | Description |
|---|---|---|
| coordinateX | int | EMUs (English Metric Unit) |
| coordinateY | int | EMUs (English Metric Unit) |
| name | string | internal name |
| sizeX | int | EMUs (English Metric Unit) |
| sizeY | int | EMUs (English Metric Unit) |
other options
| Key | Type | Description |
|---|---|---|
| customAttributes | array | Custom attributes and values. |
Method not available.
Example #1
Example #2
- phppptx 4.0:
- marginRight option.
- phppptx 3.5:
- new method.