Interface: TextBlockOptions
Options for laying out wrapped text blocks.
Properties
| Property | Type | Description |
|---|---|---|
align? | TextAlign | Horizontal alignment for laid-out content. |
bold? | boolean | Selects the bold variant of font. See TextOptions.bold. |
characterSpacing? | number | Additional spacing between characters in PDF points. |
color? | ColorInput | Color used for drawing, text, or highlighting. |
direction? | TextDirection | Text direction used for shaping and layout. |
encoding? | "winansi" | "macroman" | "pdfdoc" | Built-in font encoding. When set, the font dictionary emits an /Encoding entry with the specified encoding (e.g. /WinAnsiEncoding). When undefined, the default encoding is used. |
fallbackFonts? | PdfFont[] | Fallback fonts used when the primary font lacks a glyph. |
font? | PdfFont | Font used to render text. |
fontSize? | number | Font size in PDF points. |
height? | number | Box height in PDF points. When set together with verticalAlign, the wrapped lines are positioned within a box of this height starting at y and extending downward. Has no effect unless verticalAlign is given. |
italic? | boolean | Selects the italic variant of font. See TextOptions.italic. |
kerning? | boolean | Whether kerning should be applied where supported. |
lineHeight? | number | Line height in PDF points. |
maxLines? | number | Maximum number of lines to render. |
strike? | boolean | Draws a strike-through line over the text. |
structure? | PdfStructureOptions | Additional structure metadata for tagged PDF output. |
tag? | PdfTextStructureTag | "Artifact" | Structure tag used for tagged PDF output. |
underline? | boolean | Draws an underline beneath the text. |
verticalAlign? | VerticalAlign | Vertical alignment of the wrapped text within height. Requires height. Defaults to "top". |
width | number | Width in PDF points. |
wordSpacing? | number | Additional spacing between words in PDF points. |
writingMode? | "horizontal" | "vertical" | Text writing mode. "horizontal" (default) places characters left-to-right. "vertical" stacks characters top-to-bottom. |
x | number | Horizontal position in PDF points. |
y | number | Vertical position in PDF points. |