sempdf
sempdf v1.9.1Interfaces

Interface: RichTextOptions

sempdf v1.9.1


sempdf / RichTextOptions

Defined in: src/types.ts:1076

Options for laying out a paragraph of inline rich-text runs. Coordinates and width behave like TextBlockOptions; the style fields supply defaults inherited by any InlineTextRun that omits them.

Horizontal writing mode supports left/center/right/justify alignment and left-to-right or right-to-left ordering. Vertical writing mode stacks the runs in a single column.

Extends

  • ArtifactOptions

Properties

PropertyTypeDescriptionInherited fromDefined in
align?BlockAlign | "justify"Horizontal alignment of each line. Defaults to "left". Ignored in vertical mode.-src/types.ts:1086
artifactSubtype?"Header" | "Footer" | "Watermark"Optional artifact subtype, such as Header, Footer, or Watermark.ArtifactOptions.artifactSubtypesrc/types.ts:379
artifactType?"Pagination" | "Layout" | "Page"Artifact type written to the marked-content property dictionary.ArtifactOptions.artifactTypesrc/types.ts:377
color?ColorInputDefault color for runs that omit one.-src/types.ts:1116
direction?TextDirectionReading direction for the runs. "auto" detects from the run text. Right-to-left lays each line out from the right edge; this is line-level direction, not full mixed-direction bidirectional reordering.-src/types.ts:1103
fallbackFonts?PdfFont[]Fallback fonts for characters the run's font cannot encode.-src/types.ts:1112
font?PdfFontDefault font for runs that omit one.-src/types.ts:1110
fontSize?numberDefault font size for runs that omit one.-src/types.ts:1114
height?numberBox height in PDF points. 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. Horizontal mode only.-src/types.ts:1092
kerning?booleanDefault kerning behavior for runs that omit it.-src/types.ts:1118
lineHeight?numberLine height in PDF points (column spacing in vertical mode). Defaults to 1.2 × the largest run font size.-src/types.ts:1084
structure?PdfStructureOptionsAdditional structure metadata for tagged PDF output.-src/types.ts:1122
tag?TextTagOrArtifactStructure tag used for tagged PDF output. Defaults to "P".-src/types.ts:1120
verticalAlign?VerticalAlignVertical alignment of the wrapped runs within height. Requires height. Defaults to "top". Horizontal mode only.-src/types.ts:1097
widthnumberWidth in PDF points that runs wrap within (horizontal mode).-src/types.ts:1082
writingMode?WritingModeWriting mode. "horizontal" (default) flows runs left-to-right and wraps onto new lines. "vertical" stacks the runs top-to-bottom in one column.-src/types.ts:1108
xnumberHorizontal position in PDF points.-src/types.ts:1078
ynumberVertical position (baseline of the first line, or top of the column in vertical mode) in PDF points.-src/types.ts:1080

On this page