sempdf v1.9.1Interfaces
Interface: TemplateStyle
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
| Property | Type | Description | Defined in |
|---|---|---|---|
align? | TextAlign | Horizontal alignment for laid-out content. | src/types.ts:2301 |
color? | ColorInput | Color used for drawing, text, or highlighting. | src/types.ts:2297 |
direction? | TextDirection | Text 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? | PdfFont | Font used to render text. | src/types.ts:2291 |
fontSize? | number | Font size in PDF points. | src/types.ts:2295 |
kerning? | boolean | Whether kerning should be applied where supported. | src/types.ts:2303 |
lineHeight? | number | Line height in PDF points. | src/types.ts:2299 |
margin? | FlowMarginShorthand | CSS-like margin shorthand in PDF points. | src/types.ts:2309 |
marginBottom? | number | Bottom margin in PDF points. | src/types.ts:2315 |
marginLeft? | number | Left margin in PDF points. | src/types.ts:2317 |
marginRight? | number | Right margin in PDF points. | src/types.ts:2313 |
marginTop? | number | Top margin in PDF points. | src/types.ts:2311 |
writingMode? | WritingMode | Text writing mode. | src/types.ts:2307 |