sempdf
sempdf v1.9.1Interfaces

Interface: TemplateStyle

sempdf v1.9.1


sempdf / TemplateStyle

Defined in: src/types.ts:2289

A reusable set of typographic and spacing properties applied to template blocks through a TemplateStylesheet. Stylesheet values are merged beneath each block's inline options, so inline options always win.

Note: align accepts the full TextAlign union; image and link blocks ignore "justify" and treat it as "left".

Properties

PropertyTypeDescriptionDefined in
align?TextAlignHorizontal alignment for laid-out content.src/types.ts:2301
color?ColorInputColor used for drawing, text, or highlighting.src/types.ts:2297
direction?TextDirectionText direction used for shaping and layout.src/types.ts:2305
fallbackFonts?PdfFont[]Fallback fonts used when the primary font lacks a glyph.src/types.ts:2293
font?PdfFontFont used to render text.src/types.ts:2291
fontSize?numberFont size in PDF points.src/types.ts:2295
kerning?booleanWhether kerning should be applied where supported.src/types.ts:2303
lineHeight?numberLine height in PDF points.src/types.ts:2299
margin?FlowMarginShorthandCSS-like margin shorthand in PDF points.src/types.ts:2309
marginBottom?numberBottom margin in PDF points.src/types.ts:2315
marginLeft?numberLeft margin in PDF points.src/types.ts:2317
marginRight?numberRight margin in PDF points.src/types.ts:2313
marginTop?numberTop margin in PDF points.src/types.ts:2311
writingMode?WritingModeText writing mode.src/types.ts:2307

On this page