sempdf
sempdf v1.9.1Interfaces

Interface: TableOptions

sempdf v1.9.1


sempdf / TableOptions

Defined in: src/types.ts:2617

Options for rendering tagged tables.

Properties

PropertyTypeDescriptionDefined in
align?TextAlignHorizontal alignment for laid-out content.src/types.ts:2662
borderColor?ColorInputColor of the border lines. Setting this (or borderWidth, or borders) draws borders. Drawn as an artifact (not part of the structure tree). Defaults to a medium gray when borders are enabled without a color.src/types.ts:2683
borders?TableBorderStyleWhich border lines to draw: - "all" — full grid around every cell (default when a border color/width is set). - "horizontal" — horizontal rules between rows plus top and bottom edges; no vertical lines. - "outer" — a single frame around the whole table. - "none" — no borders, even if borderColor/borderWidth are set. When omitted, defaults to "all" if borderColor/borderWidth is set, otherwise "none".src/types.ts:2695
borderWidth?numberWidth of the border lines in PDF points. Defaults to 0.75 when borders are enabled.src/types.ts:2685
cellPadding?numberPadding inside table cells in PDF points.src/types.ts:2642
characterSpacing?numberAdditional spacing between characters in PDF points.src/types.ts:2656
color?ColorInputColor used for drawing, text, or highlighting.src/types.ts:2654
columnWidths?readonly number[] | "auto"Table column widths in PDF points. Provide an explicit array (must sum to width), or "auto" to size columns to their content — each column takes its natural un-wrapped width scaled to fill width, shrinking toward its longest-word width when content is too wide. Defaults to equal columns.src/types.ts:2630
direction?TextDirectionText direction used for shaping and layout.src/types.ts:2650
fallbackFonts?PdfFont[]Fallback fonts used when the primary font lacks a glyph.src/types.ts:2648
font?PdfFontFont used to render text.src/types.ts:2646
fontSize?numberFont size in PDF points.src/types.ts:2652
footerRows?numberNumber of trailing rows treated as a table footer. When a table is split across pages by the template paginator, these rows repeat at the bottom of every slice (mirroring how headerRows repeat at the top). Defaults to 0.src/types.ts:2638
headerBackground?ColorInputBackground fill behind header cells (header rows/columns and cells marked header: true).src/types.ts:2697
headerColumns?numberNumber of leading columns treated as table headers.src/types.ts:2640
headerRows?numberNumber of leading rows treated as table headers.src/types.ts:2632
kerning?booleanWhether kerning should be applied where supported.src/types.ts:2670
lineHeight?numberLine height in PDF points.src/types.ts:2660
rowGap?numberGap between table rows in PDF points.src/types.ts:2644
structure?PdfStructureOptionsAdditional structure metadata for tagged PDF output.src/types.ts:2672
summary?stringTable summary for accessibility (/Summary attribute on the table structure element). Provides a description of the table for screen readers.src/types.ts:2677
verticalAlign?VerticalAlignVertical alignment of each cell's content within its row height. Applies to cells shorter than the tallest cell in the row. Defaults to "top". Can be overridden per cell via TableCellDefinition.verticalAlign.src/types.ts:2668
widthnumberWidth in PDF points.src/types.ts:2623
wordSpacing?numberAdditional spacing between words in PDF points.src/types.ts:2658
xnumberHorizontal position in PDF points.src/types.ts:2619
ynumberVertical position in PDF points.src/types.ts:2621
zebra?boolean | ColorInputAlternate-row striping for body rows: true fills every second body row with a light gray, or pass a color. Header rows are not striped.src/types.ts:2702

On this page