Skip to content

<run> element

The <run> element groups words that are sequential and have the same style. Styles stored at the <run> level should be applied to the words contained within.

Attributes

Attribute Description
width The width of the run in pixels.
height The height of the run in pixels.
left The left offset of the run in pixels.
top The top offset of the run in pixels.
styles Contains a semicolon delimited list of name:value pair style information values.

Styles

Attribute Description
fontColor Contains the color to use for the run, in HTML format.
fontSize Contains the size of the font in points.
fontName Contains the font name to use for this run.
highlightColor Contains the background highlight color to use, if any, in HTML format.
underlineColor Contains the underline color to use in HTML format.
bold Indicates the text should be rendered as bold.
italics Indicates the text should be rendered as italics.
underline Indicates the text should be rendered underlined.
strikeout Indicates the text should be rendered striked out.
allCaps Indicates the text should be rendered in all-capitals.
smallCaps Indicates the text should be rendered in small-capitals.
markDel Indicates the text is marked for deletion (track-changes).
Vanish Indicates the text is marked as hidden.
superscript Indicates the text should be rendered in superscript.
subscript Indicates the text should be rendered in subscript.
scriptSizeScaler Indicates the scaler to use for either super of subscript.
charScaling Contains a character scaling multiplier.
charSpacing Contains a character spacing scaling multiplier.
charVertOffsetPos Contains a vertical offset to be applied to word position.
charKerning Indicates a kerning value.
hyperlink Contains a hyperlink that should be applied to the words.
dynamicField Indicates that the content of the run should be replaced with a dynamic field value, can be one of the following:- None- PageNumber- NumberOfPages- SectionNumber- SectionNumberOfPages
dynamicFieldFormat Indicates the format to use when replacing with a dynamic field, can be one of the following:- decimal- upperRoman- lowerRoman- upperLetter- lowerLetter- ordinal- cardinalText- ordinalText- hex
fontType Indicates the base font type, used when looking for font substitutions, can be one of the following:- Unknown- TypeSans- TypeSerif- TypeMono
direction Indicates the direction of the text, can be one of the following:- LTR- RTF

Children

Node Description
<word> A run can contain zero or more <word> elements.
<g> A run can contain zero or more <g> elements.

Example

<run styles="fontColor: #01ffff; fontSize: 10; fontName: HelveticaNeueLT Pro 55 Roman; bold: 0; italics: 0; underline: 0; strikeout: 0; allCaps: 0; smallCaps: 0; markDel: 0; vanish: 0; superScript: 0; subScript: 0; scriptSizeScaler: 0.6; charScaling: 100; charSpacing: 0; charVertOffsetPos: 0; charKerning: -12.75; hyperlink: href: #6.1.2.Open Document Flags|outline; bInternal: 0; ; ">
    <word left="468" top="565" width="33" height="16">Open</word>
    <word left="505" top="565" width="62" height="16">Document</word>
    <word left="569" top="565" width="33" height="16">Flags</word>
</run>