Appearance
zeropdf / TextBlockOptions
Interface: TextBlockOptions
Defined in: src/types.ts:839
Options for laying out wrapped text blocks.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
align? | TextAlign | Horizontal alignment for laid-out content. | src/types.ts:871 |
bold? | boolean | Selects the bold variant of font. See TextOptions.bold. | src/types.ts:849 |
characterSpacing? | number | Additional spacing between characters in PDF points. | src/types.ts:865 |
color? | ColorInput | Color used for drawing, text, or highlighting. | src/types.ts:863 |
direction? | TextDirection | Text direction used for shaping and layout. | src/types.ts:859 |
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. | src/types.ts:901 |
fallbackFonts? | PdfFont[] | Fallback fonts used when the primary font lacks a glyph. | src/types.ts:857 |
font? | PdfFont | Font used to render text. | src/types.ts:847 |
fontSize? | number | Font size in PDF points. | src/types.ts:861 |
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. | src/types.ts:877 |
italic? | boolean | Selects the italic variant of font. See TextOptions.italic. | src/types.ts:851 |
kerning? | boolean | Whether kerning should be applied where supported. | src/types.ts:886 |
lineHeight? | number | Line height in PDF points. | src/types.ts:869 |
maxLines? | number | Maximum number of lines to render. | src/types.ts:884 |
strike? | boolean | Draws a strike-through line over the text. | src/types.ts:855 |
structure? | PdfStructureOptions | Additional structure metadata for tagged PDF output. | src/types.ts:895 |
tag? | | PdfTextStructureTag | "Artifact" | Structure tag used for tagged PDF output. | src/types.ts:893 |
underline? | boolean | Draws an underline beneath the text. | src/types.ts:853 |
verticalAlign? | VerticalAlign | Vertical alignment of the wrapped text within height. Requires height. Defaults to "top". | src/types.ts:882 |
width | number | Width in PDF points. | src/types.ts:845 |
wordSpacing? | number | Additional spacing between words in PDF points. | src/types.ts:867 |
writingMode? | "horizontal" | "vertical" | Text writing mode. "horizontal" (default) places characters left-to-right. "vertical" stacks characters top-to-bottom. | src/types.ts:891 |
x | number | Horizontal position in PDF points. | src/types.ts:841 |
y | number | Vertical position in PDF points. | src/types.ts:843 |