Skip to content

zeropdf v1.3.0


zeropdf / TextBlockOptions

Interface: TextBlockOptions

Defined in: src/types.ts:839

Options for laying out wrapped text blocks.

Properties

PropertyTypeDescriptionDefined in
align?TextAlignHorizontal alignment for laid-out content.src/types.ts:871
bold?booleanSelects the bold variant of font. See TextOptions.bold.src/types.ts:849
characterSpacing?numberAdditional spacing between characters in PDF points.src/types.ts:865
color?ColorInputColor used for drawing, text, or highlighting.src/types.ts:863
direction?TextDirectionText 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?PdfFontFont used to render text.src/types.ts:847
fontSize?numberFont size in PDF points.src/types.ts:861
height?numberBox 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?booleanSelects the italic variant of font. See TextOptions.italic.src/types.ts:851
kerning?booleanWhether kerning should be applied where supported.src/types.ts:886
lineHeight?numberLine height in PDF points.src/types.ts:869
maxLines?numberMaximum number of lines to render.src/types.ts:884
strike?booleanDraws a strike-through line over the text.src/types.ts:855
structure?PdfStructureOptionsAdditional 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?booleanDraws an underline beneath the text.src/types.ts:853
verticalAlign?VerticalAlignVertical alignment of the wrapped text within height. Requires height. Defaults to "top".src/types.ts:882
widthnumberWidth in PDF points.src/types.ts:845
wordSpacing?numberAdditional 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
xnumberHorizontal position in PDF points.src/types.ts:841
ynumberVertical position in PDF points.src/types.ts:843

Released under the ISC license.