XML API - pdx:createParagraphStyle
- 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:createParagraphStyle
Creates a new Word paragraph style.
Note
You are reading the XML API documentation. For the PHP API method please go to createParagraphStyle.
Description
Element definition
This element allows the generation of custom paragraph styles that may be later used in combination with, for example, the addText element.
Attributes and sub-elements
name
A string with the name of the Word style that you are creating.
styleOptions
Key | Description |
---|---|
bold | Bold text: 'on' or 'off'. |
border | Hexadecimal color value: 'FF0000', '000000'... |
caps | Displays text in capital letters: 'on' or 'off'. |
color | Hexadecimal color value: 'FF0000', '000000'... |
contextualSpacing | Ignores spacing above and below when using identical styles: 'on' or 'off' (default). |
doubleStrikeThrough | If true displays text in doubleStrikeThrough. |
font | Font family: 'Arial', Calibri'... |
fontSize | Text size in points: 8, 9, 10... |
hanging | Paragraph hanging in twentieths of a point (twips). |
italic | Italics: 'on' or 'off'. |
indentLeft | Left margin in twips (twentieths of a point). |
indentRight | Right margin in twips (twentieths of a point). |
indentFirstLine | Extra indent for the first line of the paragraph. |
jc | Text alignment. Possible values are: 'center', 'right', 'both', 'distribute'. |
keepLines | Keeps (whenever possible) all the current paragraph lines on the same page: 'on' or 'off' (default). |
keepNext | Keeps (whenever possible) in the same page the current paragraph with next paragraph: 'on' or 'off' (default). |
lineSpacing | Separation between lines: 240 (single spacing), 480 (double spacing) and so long so forth. |
outlineLvl | Heading level (1-9). |
pageBreakBefore | Forces a page break before the paragraph. 'on' or 'off'. |
position | Position value. Positive value for raised and negative value for lowered. |
scaling | Scaling value, 100 is the default value. |
spacingBottom | Bottom padding in twentieths of a point. |
spacingTop | Top padding in twentieths of a point. |
smallCaps | Displays text in small capital letters: 'on' or 'off'. |
strikeThrough | If true displays text in strikethrough. |
tabPositions | Each entry is an associative array with the following keys and values:
|
If there is a tab and the tabPositions array is not defined the standard tab position (default of 708) will be used.
textDirection | Text flow: lrTb, tbRl, btLr, lrTbV, tbRlV, tbLrV. |
underline | Underlines text. Possible values are: 'single', 'words', 'double', 'dotted', 'dash' and 'wave'. |
underlineColor | Underlines text with a color: 'FF0000', '000000'... |
vanish | Uses a vanish style. |
widowControl | Prevents Word from printing the last line of a paragraph by itself at the top of the page (widow) or the first line of a paragraph at the bottom of a page (orphan): 'on' or 'off'. |
wordWrap | Allows line breaking at character level: 'on' or 'off' (default). |