6. TableSetting & ColumnSetting - Jackalopeys/JackalopePDF GitHub Wiki
TableSetting
and ColumnSetting
are core classes used to control table layout, style, font, and per-column behaviors for PDF rendering. These settings give you full customization over how your table looks and behaves.
🔹 Layout Settings
RowHeight
– Height of each content rowHeaderHeight
– Height of the header rowMaxRowsPerPage
– Max rows allowed per page before auto page-breakBreakPageWhenFull
– If true, triggers a new page when max rows are reachedColumnWidths
– Array defining width for each columnColumnUnit
– Sizing strategy (Auto / Fixed / Percentage)TotalWidthForPercentageUnit
– Used only ifColumnUnit
is set to Percentage
🔹 Font & Text Settings
FontSize
,FontStyle
,FontColor
– Font settings for normal cell contentHeaderFontSize
,HeaderFontStyle
,HeaderFontColor
,HeaderAlignment
– Overrides for the header (fallback to default if not set)FooterFontSize
,FooterFontStyle
– Footer row font settingsTruncate
,TruncateSuffix
– Truncates overflowing text and adds suffix (e.g., "...")
🔹 Color & Styling
BackgroundColor
– Background color for the tableZebraColor
– Alternate row color for zebra stripingEnableZebraStriping
– Enables or disables zebra effectBorderColor
– Border color for cellsHeaderBackgroundColor
– Header background colorSummaryPageBackgroundColor
– Background color for page summary rowsGrandTotalBackgroundColor
– Background color for the grand total rowSummaryPageFontColor
,GrandTotalFontColor
– Font color for summary rows
🔹 Alignment & Summary Rows
HeaderNames
– Custom header labels per columnColumnAlignment
– Text alignment for each column (Left, Center, Right)ColumnFormatType
– Format type for data (e.g., Number, Currency, Date)SummaryEachPage
– Adds a subtotal row at the end of each pageIncludeGrandTotal
– Adds a final grand total row at the end of the reportPageSummarySettings
/GrandTotalSettings
– Column-wise config for what to sum or display
🔹 Border & Visibility
ShowHeader
– Shows or hides the header rowShowVerticalLines
– Enables vertical lines between columnsShowOuterBorder
– Draws a border around the full tableShowRowLines
– Shows horizontal lines between rowsShowHeaderTopBorder
,ShowHeaderBottomLine
– Controls header border visibilityShowFooterTopBorder
,ShowFooterBottomBorder
– Controls footer border visibility
🔹 ColumnSetting (Per-column Customization)
Use ColumnSetting
to override default behavior for individual columns. These properties take precedence over TableSetting
.
HeaderName
,HeaderAlignment
,HeaderBackgroundColor
,HeaderFontColor
Width
,FontStyle
,BackgroundColor
,FontColor
Alignment
,FormatType
PageSummaryLabel
,IncludePageSummary
GrandTotalLabel
,IncludeGrandTotal
If a property is not defined here, it will fallback to the value from
TableSetting
.
You can pass these settings into SetTable()
and SetColumn()
before calling DrawTable()
to render a fully customized and dynamic PDF table.