Writes multiple data types (text, string field, date field, and numeric field) into one object.
Attributes
| Attributes | Description |
|---|---|
| alignment | Sets the horizontal justification of the text based on a defined width. Type: String Default Value: left Values: left | center | right |
| color | Sets the font color by the using RGB-triplet (#ffffff for white; #ff0000 for red, etc) or from list of the predefined colors below. Type: String Default Value: black Predefined Values: black | blue| cyan | darkGray | gray | green | lightGray | magenta | orange | pink | red | white | yellow |
| dynamic | A dynamic element increases the height of the element to fit the content of that element. Computing that dynamic height is expensive, so use it with care. |
| excel-wrap-text | When outputting to Excel, sets the text to word wrap. Type: Boolean Default Value: true |
| font-embedded | Specifies the font to embed into the PDF file. Type: Boolean Default Value: false |
| font-encoding | Specifies the encoding to be used for the PDF. Type: String |
| fontname | Sets the font name. Type: String |
| fontsize | Sets the font size. Type: Integer |
| fontstyle | Sets font style. This is a shortcut for defining fsbold and fsitalic. Type: String Values: plain | bold | italic | bolditalic |
| fsbold | Sets font to italics. Type: Boolean Default Value: false |
| fsitalic | Sets font to italics. Type: Boolean Default Value: false |
| fsstrikethr | Sets font to strikethrough. Type: Boolean Default Value: false |
| fsunderline | Sets font to underline. Type: Boolean Default Value: false |
| height | Determines the minimum height. Value is a whole number where each increment is equivalent to 1/72 of an inch or percentage. Type: Integer The height is required. |
| href | Sets a hyperlink for the section. Type: String |
| line-height | The height of a single text line in text elements. If the line-height is set and is greater than the font size, extra padding will be added between the lines making text more readable. Type: Integer |
| name | Used to reference the element later. Functions pick up elements by their name. Type: String |
| nullstring | If a null value, replace with a predefined value. |
| reserve-literal | Determines the text printed when the text does not fit completely into an element. Type: String Default value: "..." |
| trim-text-content | Defines, whether leading and trailing whitespaces of the generated lines get removed. Important for a clean layout. Type: Boolean Default Value: true |
| vertical-alignment | Sets the vertical position of the text. Default Value: top Values: top | middle | bottom |
| visible | Sets whether the object will be printed. Type: Boolean Default Value: true |
| width | Set the horizontal width of the object. Width is required. |
| x | Defines the horizontal starting position an object defined by a value or percentage. |
| y | Defines the vertical starting position of an object defined by a value or percentage. |
Number Formatting Table
| Symbol | Location | Localized? | Meaning |
|---|---|---|---|
| 0 | Number | Yes | Digit |
| # | Number | Yes | Digit, zero shows as absent |
| . | Number | Yes | Decimal separator or monetary decimal separator |
| - | Number | Yes | Minus sign |
| , | Number | Yes | Grouping separator |
| E | Number | Yes | Separates mantissa and exponent in scientific notation. Need not be quoted in prefix or suffix. |
| ; | Sub-pattern boundary | Yes | Separates positive and negative sub-patterns |
| % | Prefix or suffix | Yes | Multiply by 100 and show as percentage |
| (\u2030) | Prefix or suffix | Yes | Multiply by 1000 and show as per mille |
| ¤ (\u00A4) | Prefix or suffix | No | Currency sign, replaced by currency symbol. If doubled, replaced by international currency symbol. If present in a pattern, the monetary decimal separator is used instead of the decimal separator. |
| ' | Prefix or suffix | No | Used to quote special characters in a prefix or suffix, for example, "'#'#" formats 123 to "#123". To create a single quote itself, use two in a row: "# o''clock". |
Date Formatting Table
| Symbol | Meaning | Type | Example |
|---|---|---|---|
| G | Era | Text | "GG" -> "AD" |
| Y | Year | Number | "yy" -> "03" "yyyy" -> "2003" |
| M | Month | Text or Number | "M" -> "7" "M" -> "12" "MM" -> "07" "MMM" -> "Jul" "MMMM" -> "December" |
| D | Day in month | Number | "d" -> "3" "dd" -> "03" |
| H | Hour (1-12, AM/PM) | Number | "h" -> "3" "hh" -> "03" |
| H | Hour (0-23) | Number | "H" -> "15" "HH" -> "15" |
| K | Hour (1-24) | Number | "k" -> "3" "kk" -> "03" |
| K | Hour (0-11 AM/PM) | Number | "K" -> "15" "KK" -> "15" |
| M | Minute | Number | "m" -> "7" "m" -> "15" "mm" -> "15" |
| S | Second | Number | "s" -> "15" "ss" -> "15" |
| S | Millisecond (0-999) | Number | "SSS" -> "007" |
| E | Day in week | Text | "EEE" -> "Tue" "EEEE" -> "Tuesday" |
| D | Day in year (1-365 or 1-364) | Number | "D" -> "65" "DDD" -> "065" |
| F | Day of week in month (1-5) | Number | "F" -> "1" |
| W | Week in year (1-53) | Number | "w" -> "7" |
| W | Week in month (1-5) | Number | "W" -> "3" |
| A | AM/PM | Text | "a" -> "AM" "aa" -> "AM" |
| Z | Time zone | Text | "z" -> "EST" "zzz" -> "EST" "zzzz" -> "Eastern Standard Time" |
| ' | Escape for text | Delimiter | "'hour' h" -> "hour 9" |
| '' | Single quote | Literal | "ss''SSS" -> "45'876" |