pdx:addStructuredDocumentTag

Inserts different types of Structured Document Tags into the Word document.

Description

Element definition

This element allows to insert structured document tags (sdt) of various kinds into your Word document:

  • combo boxes,
  • date pickers,
  • dropdown lists and
  • rich text.
Attributes and sub-elements

sdtType

Possible values are:

  • comboBox
  • date
  • dropdownList
  • richText

For a detailed description of the available date formats for the date picker structured document tag, please, check the documentation of the addDateAndHour element.

options

Specific options for structured document tags:

key Description
alias The label that will be shown in the structured document tag.
calendar Calendar type. Default type is gregorian. Possible values include: gregorian, hijri, hebrew, taiwan, japan, thai, korea, saka, gregorianXlitEnglish, gregorianXlitFrench.
dateFormat The default date format is M/d/yyyy. See addDateAndHour for available date formats.
listItems An array of arrays each one of them containing the text to show and value.
local ISO code. The default value is en-US.
lock Locking properties:
  • sdtLocked (cannot be deleted),
  • contentLocked (contents cannot be edited directly),
  • unlocked (default value: no locking) and
  • sdtContentLocked (contents cannot be directyly edited or the structured tag removed).
placeholderText Text to be shown by default.
tag A programmatic tag.
temporary If true the structured tag is removed after editing.
rawWordML If true one may store the output into a variable.

The possible keys and values are:

key Description
pStyle The WordML fragment object containing the contents for the even pages header
backgroundColor Hexadecimal color value: FF0000, 000000...
bidi Set to true for right to left languages like Hebrew or Arabic.
bold If true the text will be shown in bold characters.
border Available values are:
  • none (default)
  • double
  • dashed
  • outset
  • inset
  • threeDEmboss
  • threeDEngrave
You can access to the complete list in: Border Styles.
borderBottom Overwrites the general border type for the bottom border of the paragraph.
borderLeft Overwrites the general border type for the left border of the paragraph.
borderTop Overwrites the general border type for the top border of the paragraph.
borderRight Overwrites the general border type for the right border of the paragraph.
borderColor Hexadecimal color value: FF0000, 000000...
borderBottomColor Overwrites the general border color for the bottom border of the paragraph.
borderLeftColor Overwrites the general border color for the left border of the paragraph.
borderTopColor Overwrites the general border color for the top border of the paragraph.
borderRightColor Overwrites the general border color for the right border of the paragraph.
borderSpacing Separation between border and text in points.
borderBottomSpacing Overwrites the general border spacing for the bottom border of the paragraph.
borderLeftSpacing Overwrites the general border spacing for the left border of the paragraph.
borderTopSpacing Overwrites the general border spacing for the top border of the paragraph.
borderRightSpacing Overwrites the general border spacing for the right border of the paragraph.
borderWidth Border width in eigths of a point.
borderBottomWidth Overwrites the general border width for the bottom border of the paragraph.
borderLeftWidth Overwrites the general border width for the left border of the paragraph.
borderTopWidth Overwrites the general border width for the top border of the paragraph.
borderRightWidth Overwrites the general border width for the right border of the paragraph.
caps If true displays text in capital letters.
color Hexadecimal color value: 'FF0000', '000000'...
contextualSpacing If true ignores spacing above and below the paragraph whenever the neighbouring paragraphs use the same Word style (false by default).
firstLineIndent First line indentation in twentieths of a point (twips).
font Font family: 'Arial', Calibri'...
fontSize Font size in points.
hanging Paragraph hanging in twentieths of a point (twips).
headingLevel The heading level if we want this paragraph to be a heading.
italic If true displays the text in italics.
indentLeft Left margin in points.
indentRight Right margin in points
keepLines Keeps (whenever possible) all the current paragraph lines on the same page (default value is false).
keepNext Keeps (whenever possible) in the same page the current paragraph with next paragraph (default value is false).
lineSpacing 1 corresponds to single line spacing, 2 to double line spacing and so long so forth. It admits decimal numbers.
pageBreakBefore If true forces a page break before the paragraph.
rtl Set to true for right to left languages like Hebrew or Arabic.
smallCaps If true displays text in small capital letters.
spacingBottom Bottom padding in twentieths of a point
spacingTop Top padding in twentieths of a point
textAlign Text alignment within paragraphs. Possible values are: center, right, both and distribute.
textDirection Text flow direction within a table cell. Possible values are: lrTb, tbRl, btLr, lrTbV, tbRlV and tbLrV.
underline Underlines text. Possible values are: single, words, double, dotted, dash and wave.
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).
wordWrap Allows line breaking at character level (default value is false).
Code samples
#Example 1

config.xml

content.xml

settings.xml

The resulting Word document looks like: