XML API - pdx:addShape
- addBackgroundImage
- addFooter
- addHeader
- addLineNumbering
- addMacroFromDoc
- addPageBorders
- addProperties
- addSection
- createCharacterStyle
- createListStyle
- createParagraphStyle
- docxSettings
- importHeadersAndFooters
- importListStyle
- importStyles
- modifyPageLayout
- parseStyles
- removeFooters
- removeHeaders
- setBackgroundColor
- setDefaultFont
- setDocumentDefaultStyles
- setEncodeUTF8
- setLanguage
- setMarkAsFinal
- addBookmark
- addBreak
- addChart
- addComment
- addCrossReference
- addDateAndHour
- addEndnote
- addExternalFile
- addFootnote
- addFormElement
- addHeading
- addImage
- addLink
- addList
- addMathEquation
- addMergeField
- addOnlineVideo
- addPageNumber
- addShape
- addSimpleField
- addStructuredDocumentTag
- addTable
- addTableContents
- addTableFigures
- addText
- addTextBox
- addWordML
- embedHTML
- clearBlocks
- deleteBlock
- modifyInputFields
- processTemplate
- rawSearchAndReplace
- removeTemplateVariable
- replaceListVariable
- replacePlaceholderImage
- replaceTableVariable
- replaceVariableByExternalFile
- replaceVariableByHtml
- replaceVariableByText
- replaceVariableByWordFragment
- replaceVariableByWordML
- setTemplateSymbol
- setTemplateBlockSymbol
pdx:addShape
Inserts different types of shapes into a Word document.
Note
You are reading the XML API documentation. For the PHP API method please go to addShape.
Description
Element definition
This element inserts a shape into the Word document.
The available types include:
- arcs of a circle (filled or not)
- bezier curves (filled or not)
- straight lines
- polylines
- rectangles
- rectangles with rounded corners
- arbitrary shapes (VML paths)
- ovals
Attributes and sub-elements
type
arc, curve, line, polyline, rect, roundrect, shape, oval.
options
| Key | Description |
|---|---|
| width | Shape width given in points. |
| height | Shape height given in points. |
| position | The possible values are: absolute, relative. |
| margin-top | The possible values are: absolute, relative. |
| margin-left | Left margin given in points. |
| z-index | Equivalent to the CSS z-index property. Choose a high positive number to make sure that the shape is over the text or a negative number if you want the shape to be behind the text. |
| strokecolor | The chosen line color in hexadecimal value: #ff0000, #00ffff. |
| strokeweight | The width of the line in points: 1.0 pt, 3.5 pt... |
| fillcolor | The chosen fill color in hexadecimal value: #ff0000, #00ffff. |
Options for specific types:
| Key | Description |
|---|---|
| arc | |
| startAngle | The angle of the tangent line at the initial point of the arc. |
| endAngle | The angle of the tangent line at the final point of the arc. |
| line and curve | |
| from | The x and y coordinates of the initial point in the format "x,y". |
| to | The x and y coordinates of the final point in the format "x,y". |
| control1 | The final control point for the bezier curve (it does not apply for plain lines) in the format "x,y". |
| control2 | The final control point for the bezier curve (it does not apply for plain lines) in the format "x,y". |
| roundrect | |
| arcsize | A number describing the "roundness" of the rectangle corners: 0.5, 1.8". |
| shape | |
| path | The VML path describing the shape. You need a working knowledge of the VML standard. |
| coordsize | The VML path describing the shape. You need a working knowledge of the VML standard. |
