addSvg
- getTemplateVariables
- getTemplateVariablesType
- processTemplate
- removeVariableAudio
- removeVariableImage
- removeVariableText
- removeVariableVideo
- replaceVariableAudio
- replaceVariableHtml
- replaceVariableImage
- replaceVariableList
- replaceVariablePptxFragment
- replaceVariableTable
- replaceVariableText
- replaceVariableVideo
- setTemplateSymbol
addSvg
BASIC / ADVANCED / PREMIUM
Inserts an SVG into the PowerPoint presentation.
Description
public addSvg($svg, $position, $svgStyles = array(), $options = array())
You may use this method to insert an SVG content, as file or string, into the PowerPoint presentation.
To keep compatibility with PPTX readers not compatible with SVG images, a PNG image with the same content is added too in the presentation.
Parameters
svg
File path or SVG content.
position
| Key | Type | Description |
|---|---|---|
| coordinateX | int | EMUs (English Metric Unit). |
| coordinateY | int | EMUs (English Metric Unit). |
| sizeX | int | EMUs (English Metric Unit). |
| sizeY | int | EMUs (English Metric Unit). |
| name | string | Internal name. If not set, a random name is generated. |
| order | int | Set the display order. Default after existing contents. 0 is the first order position. If the order position doesn't exist add after existing contents. |
svgStyles
| Key | Type | Description |
|---|---|---|
| border | array |
|
| descr | string | Descr value. |
| rotation | int | 60.000ths of a degree. |
Exceptions
ImageMagick extension is not enabled.
Position not valid.
Release notes
- phppptx 4.5:
- rotation uses 60.000ths of a degree.
- phppptx 3.0:
- new method.