sempdf v1.9.1Interfaces
Interface: TextBlockOptions
sempdf / TextBlockOptions
Defined in: src/types.ts:933
Options for laying out wrapped text blocks.
Extends
ArtifactOptions
Properties
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
align? | TextAlign | Horizontal alignment for laid-out content. | - | src/types.ts:965 |
artifactSubtype? | "Header" | "Footer" | "Watermark" | Optional artifact subtype, such as Header, Footer, or Watermark. | ArtifactOptions.artifactSubtype | src/types.ts:379 |
artifactType? | "Pagination" | "Layout" | "Page" | Artifact type written to the marked-content property dictionary. | ArtifactOptions.artifactType | src/types.ts:377 |
bold? | boolean | Selects the bold variant of font. See TextOptions.bold. | - | src/types.ts:943 |
characterSpacing? | number | Additional spacing between characters in PDF points. | - | src/types.ts:959 |
color? | ColorInput | Color used for drawing, text, or highlighting. | - | src/types.ts:957 |
direction? | TextDirection | Text direction used for shaping and layout. | - | src/types.ts:953 |
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:995 |
fallbackFonts? | PdfFont[] | Fallback fonts used when the primary font lacks a glyph. | - | src/types.ts:951 |
font? | PdfFont | Font used to render text. | - | src/types.ts:941 |
fontSize? | number | Font size in PDF points. | - | src/types.ts:955 |
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:971 |
highlight? | ColorInput | Background highlight color drawn behind the text. See TextOptions.highlight. | - | src/types.ts:1011 |
horizontalScaling? | number | Horizontal glyph scaling percentage. See TextOptions.horizontalScaling. | - | src/types.ts:1009 |
italic? | boolean | Selects the italic variant of font. See TextOptions.italic. | - | src/types.ts:945 |
kerning? | boolean | Whether kerning should be applied where supported. | - | src/types.ts:980 |
lineHeight? | number | Line height in PDF points. | - | src/types.ts:963 |
maxLines? | number | Maximum number of lines to render. | - | src/types.ts:978 |
renderMode? | TextRenderMode | Glyph painting mode. See TextOptions.renderMode. | - | src/types.ts:1003 |
rise? | number | Raises (+) or lowers (−) the baseline in PDF points. See TextOptions.rise. | - | src/types.ts:997 |
strike? | boolean | Draws a strike-through line over the text. | - | src/types.ts:949 |
strokeColor? | ColorInput | Stroke color for stroking render modes. See TextOptions.strokeColor. | - | src/types.ts:1005 |
strokeWidth? | number | Stroke width for stroking render modes. See TextOptions.strokeWidth. | - | src/types.ts:1007 |
structure? | PdfStructureOptions | Additional structure metadata for tagged PDF output. | - | src/types.ts:989 |
subscript? | boolean | Renders the block as subscript. See TextOptions.subscript. | - | src/types.ts:1001 |
superscript? | boolean | Renders the block as superscript. See TextOptions.superscript. | - | src/types.ts:999 |
tag? | TextTagOrArtifact | Structure tag used for tagged PDF output. | - | src/types.ts:987 |
underline? | boolean | Draws an underline beneath the text. | - | src/types.ts:947 |
verticalAlign? | VerticalAlign | Vertical alignment of the wrapped text within height. Requires height. Defaults to "top". | - | src/types.ts:976 |
width | number | Width in PDF points. | - | src/types.ts:939 |
wordSpacing? | number | Additional spacing between words in PDF points. | - | src/types.ts:961 |
writingMode? | WritingMode | Text writing mode. "horizontal" (default) places characters left-to-right. "vertical" stacks characters top-to-bottom. | - | src/types.ts:985 |
x | number | Horizontal position in PDF points. | - | src/types.ts:935 |
y | number | Vertical position in PDF points. | - | src/types.ts:937 |