Skip to main content

Interface: TemplateStyle

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

PropertyTypeDescription
align?TextAlignHorizontal alignment for laid-out content.
color?ColorInputColor used for drawing, text, or highlighting.
direction?TextDirectionText direction used for shaping and layout.
fallbackFonts?PdfFont[]Fallback fonts used when the primary font lacks a glyph.
font?PdfFontFont used to render text.
fontSize?numberFont size in PDF points.
kerning?booleanWhether kerning should be applied where supported.
lineHeight?numberLine height in PDF points.
margin?FlowMarginShorthandCSS-like margin shorthand in PDF points.
marginBottom?numberBottom margin in PDF points.
marginLeft?numberLeft margin in PDF points.
marginRight?numberRight margin in PDF points.
marginTop?numberTop margin in PDF points.
writingMode?"horizontal" | "vertical"Text writing mode.