Styles and borders
Fonts, sizes, colours, alignment, padding and per-side borders, and named styles that elements share with styleName.
Inline styles merge over a named style (styleName), which merges over the report font. Borders take a shorthand per side, so table cells can share edges.
"styles": {
"th": { "bold": true, "align": "center", "background": "#eef1f6", "border": "0.2 solid #8a94a6" },
"num": { "align": "right", "border": { "bottom": "0.15 solid #b9c1cd" } }
},
"bands": { "detail": { "height": 6, "elements": [
{ "type": "field", "x": 140, "y": 0, "w": 40, "h": 6, "expr": "amount", "format": "#,##0", "styleName": "num", "style": { "bold": true } }
] } }| Name | Type | Description |
|---|---|---|
fontFamily, fontSize | string, number | Font family and size in points (default 9). |
bold, italic, underline, strike | boolean | Font styles. |
color, background | string | Text and background color. |
align, valign | 'left' | 'center' | 'right' | 'justify'; 'top' | 'middle' | 'bottom' | Horizontal and vertical alignment. |
padding | number | [t, r, b, l] | Inner padding in mm (default 1 horizontally, 0.5 vertically). |
border | true | "0.3 solid #333" | { top, right, bottom, left } | true = 0.2mm solid black; a CSS-like string; or per side. |
lineHeight | number | Multiple of the font size (default 1.25). |
wrap | boolean | Wrap long text (default true); false cuts at the box edge. |
shrinkToFit | boolean | Shrink the font until one line fits. |
letterSpacing | number | Letter spacing in mm (spaced titles like 견 적 서). |