Skip to content

zeropdf v1.3.0


zeropdf / TemplateStyle

Interface: TemplateStyle

Defined in: src/types.ts:1845

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:1857
color?ColorInputColor used for drawing, text, or highlighting.src/types.ts:1853
direction?TextDirectionText direction used for shaping and layout.src/types.ts:1861
fallbackFonts?PdfFont[]Fallback fonts used when the primary font lacks a glyph.src/types.ts:1849
font?PdfFontFont used to render text.src/types.ts:1847
fontSize?numberFont size in PDF points.src/types.ts:1851
kerning?booleanWhether kerning should be applied where supported.src/types.ts:1859
lineHeight?numberLine height in PDF points.src/types.ts:1855
margin?FlowMarginShorthandCSS-like margin shorthand in PDF points.src/types.ts:1865
marginBottom?numberBottom margin in PDF points.src/types.ts:1871
marginLeft?numberLeft margin in PDF points.src/types.ts:1873
marginRight?numberRight margin in PDF points.src/types.ts:1869
marginTop?numberTop margin in PDF points.src/types.ts:1867
writingMode?"horizontal" | "vertical"Text writing mode.src/types.ts:1863

Released under the ISC license.