Skip to content

zeropdf v1.3.0


zeropdf / TextOptions

Interface: TextOptions

Defined in: src/types.ts:762

Options for placing a single line of text.

Properties

PropertyTypeDescriptionDefined in
artifactType?"Pagination" | "Layout" | "Page"Artifact type classification for tagged PDF content. "Pagination" for headers/footers, "Layout" for typographic ornaments, "Page" for watermarks. Emitted as /Type in the /Artifact BMC/EMC pair.src/types.ts:816
bold?booleanSelects the bold variant of font. For a built-in family (Helvetica, Times-Roman, Courier) this resolves to the matching bold base font. For a font family registered with PdfDocument.registerFontFamily it selects the registered bold face. Ignored when font is an explicit embedded-font handle.src/types.ts:776
characterSpacing?numberAdditional spacing between characters in PDF points.src/types.ts:795
color?ColorInputColor used for drawing, text, or highlighting.src/types.ts:793
direction?TextDirectionText direction used for shaping and layout.src/types.ts:789
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:822
fallbackFonts?PdfFont[]Fallback fonts used when the primary font lacks a glyph.src/types.ts:787
font?PdfFontFont used to render text.src/types.ts:768
fontSize?numberFont size in PDF points.src/types.ts:791
italic?booleanSelects the italic/oblique variant of font, following the same resolution rules as bold. Combine with bold for bold italic.src/types.ts:781
kerning?booleanWhether kerning should be applied where supported.src/types.ts:801
leading?numberText leading value in PDF points.src/types.ts:799
strike?booleanDraws a strike-through line over the text.src/types.ts:785
structure?PdfStructureOptionsAdditional structure metadata for tagged PDF output.src/types.ts:810
tag?| PdfTextStructureTag | "Artifact"Structure tag used for tagged PDF output.src/types.ts:808
underline?booleanDraws an underline beneath the text.src/types.ts:783
wordSpacing?numberAdditional spacing between words in PDF points.src/types.ts:797
writingMode?"horizontal" | "vertical"Text writing mode. "horizontal" (default) places characters left-to-right. "vertical" stacks characters top-to-bottom.src/types.ts:806
xnumberHorizontal position in PDF points.src/types.ts:764
ynumberVertical position in PDF points.src/types.ts:766

Released under the ISC license.