Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

PdfTableStyle

Namespace OfficeIMO.Pdf
Assembly OfficeIMO.Pdf
Source revision c8404474f9f2 with working tree changes

Describes visual and layout options for table rendering. Attach an instance to a table block or use the presets in TableStyles.

Inheritance

  • Object
  • PdfTableStyle

Usage

Explore 22 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 7

Constructors

public PdfTableStyle() #

Methods

public PdfTableStyle Clone() #
Returns: PdfTableStyle

Creates a deep copy of this style.

Properties

public PdfColor? BorderColor { get; set; } #

Color of the table borders and cell grid lines. Set to null to hide borders.

public Boolean ConsumesVerticalFlow { get; set; } #

Whether the table advances the vertical flow cursor. Set to false for a positioned table that overlays the following flow; the table is still drawn at the current cursor position.

public PdfTablePosition? Position { get; set; } #

Optional floating placement. A positioned table reserves space for surrounding text without advancing the flow cursor.

public Double BorderWidth { get; set; } #

Stroke width, in points, for table borders and cell grid lines.

public Double CornerRadius { get; set; } #

Corner radius, in points, for the table's outer box. Zero (the default) keeps square corners. The rounding is applied to the outer perimeter only: the top corners of the first row and the bottom corners of the last row are rounded, while interior grid lines stay straight. Cell fills and per-cell border overrides (for example an accent stripe or a top-accent bar) are clipped to the rounded outer box so they follow the curve instead of overrunning it. Most useful for single-row / single-cell tables such as callouts and stat cards.

public PdfColor? HeaderFill { get; set; } #

Background fill color for the header row. Set to null for no fill.

public PdfColor? FooterFill { get; set; } #

Background fill color for footer rows. Set to null for no fill.

public PdfColor? RowStripeFill { get; set; } #

Optional alternating row fill color (applied to every other body row). Set to null to disable.

public PdfColor? RowSeparatorColor { get; set; } #

Optional horizontal separator color drawn at the bottom of each table row. Set to null or zero width to disable.

public Double RowSeparatorWidth { get; set; } #

Stroke width, in points, for row separators.

public PdfColor? HeaderSeparatorColor { get; set; } #

Optional horizontal separator color used below header rows. Falls back to PdfTableStyle.RowSeparatorColor when null.

public Double HeaderSeparatorWidth { get; set; } #

Optional stroke width, in points, used below header rows. Falls back to PdfTableStyle.RowSeparatorWidth when zero.

public PdfColor? FooterSeparatorColor { get; set; } #

Optional horizontal separator color used above footer rows. Falls back to PdfTableStyle.RowSeparatorColor when null.

public Double FooterSeparatorWidth { get; set; } #

Optional stroke width, in points, used above footer rows. Falls back to PdfTableStyle.RowSeparatorWidth when zero.

public List<PdfColor?>? BodyColumnFills { get; set; } #

Optional per-column background fills for body rows. Null or missing entries use the row fill.

public Dictionary<ValueTuple<Int32, Int32>, PdfColor>? CellFills { get; set; } #

Optional absolute per-cell background fills keyed by zero-based row and column.

public Dictionary<ValueTuple<Int32, Int32>, PdfCellDataBar>? CellDataBars { get; set; } #

Optional proportional bars drawn inside cells, behind cell text, keyed by zero-based row and column.

public Dictionary<ValueTuple<Int32, Int32>, PdfCellIcon>? CellIcons { get; set; } #

Optional small vector icons drawn inside cells before cell text, keyed by zero-based row and column.

public Dictionary<ValueTuple<Int32, Int32>, PdfCellBorder>? CellBorders { get; set; } #

Optional side-specific per-cell border overrides keyed by zero-based row and column.

public Dictionary<ValueTuple<Int32, Int32>, PdfCellPadding>? CellPaddings { get; set; } #

Optional per-cell padding overrides keyed by zero-based row and column.

public Dictionary<ValueTuple<Int32, Int32>, PdfColumnAlign>? CellAlignments { get; set; } #

Optional per-cell horizontal alignment overrides keyed by zero-based row and column.

public Dictionary<ValueTuple<Int32, Int32>, PdfCellVerticalAlign>? CellVerticalAlignments { get; set; } #

Optional per-cell vertical alignment overrides keyed by zero-based row and column.

public PdfColor? TextColor { get; set; } #

Text color for body rows. When null the writer’s default text color is used.

public Double? FontSize { get; set; } #

Font size for body cells, in points. When null the document default font size is used.

public Double? LineHeight { get; set; } #

Line advance multiplier for wrapped cell text. When null the writer uses the default table line height.

public PdfColor? HeaderTextColor { get; set; } #

Text color for header cells. When null the writer’s default text color is used.

public Double? HeaderFontSize { get; set; } #

Font size for header cells, in points. When null the body table font size is used.

public Boolean HeaderBold { get; set; } #

When true, header cells use the bold variant of the document font family.

public Int32 HeaderRowCount { get; set; } #

Number of leading rows to render as table headers. Defaults to 1.

public Int32? RepeatHeaderRowCount { get; set; } #

Number of leading header rows to repeat on following pages. When null, all configured header rows repeat.

public Int32 MinimumBodyRowsOnFirstPage { get; set; } #

Minimum number of body rows kept with leading header rows when a table starts on a partially occupied page and the group fits on one page. Set to zero to allow a header-only first segment. Defaults to two.

public Int32 FooterRowCount { get; set; } #

Number of trailing rows to render as table footers. Defaults to 0.

public Int32 MinimumBodyRowsOnLastPage { get; set; } #

Minimum number of body rows kept with trailing footer rows on the table's final page when the group fits on one page. Set to zero to disable this pagination constraint. Defaults to two.

public PdfColor? FooterTextColor { get; set; } #

Text color for footer cells. When null the writer’s default text color is used.

public Double? FooterFontSize { get; set; } #

Font size for footer cells, in points. When null the body table font size is used.

public Boolean FooterBold { get; set; } #

When true, footer cells use the bold variant of the document font family.

public Double CellPaddingX { get; set; } #

Horizontal padding inside each cell, in points.

public Double CellPaddingY { get; set; } #

Vertical padding inside each cell, in points.

public Double? CellPaddingLeft { get; set; } #

Optional left padding override inside each cell, in points. When null PdfTableStyle.CellPaddingX is used.

public Double? CellPaddingRight { get; set; } #

Optional right padding override inside each cell, in points. When null PdfTableStyle.CellPaddingX is used.

public Double? CellPaddingTop { get; set; } #

Optional top padding override inside each cell, in points. When null PdfTableStyle.CellPaddingY is used.

public Double? CellPaddingBottom { get; set; } #

Optional bottom padding override inside each cell, in points. When null PdfTableStyle.CellPaddingY is used.

public Double CellSpacing { get; set; } #

Optional spacing between adjacent table cells, in points.

public Double MinRowHeight { get; set; } #

Optional minimum row height in points. Set to 0 to size rows from wrapped content.

public List<Double?>? RowMinHeights { get; set; } #

Optional per-row minimum heights in points. Null entries fall back to PdfTableStyle.MinRowHeight.

public List<Double?>? FixedRowHeights { get; set; } #

Optional per-row fixed heights in points. Null entries use content-driven row sizing and minimum row heights.

public Double SpacingBefore { get; set; } #

Vertical space before the table, in points.

public Double PageContinuationSpacingBefore { get; set; } #

Vertical space to reserve before table content when the same table continues on a new page.

public String? Caption { get; set; } #

Optional text rendered above the table grid as part of the table flow.

public String? AlternativeText { get; set; } #

Optional alternate text attached to the tagged PDF table structure. This is not rendered visibly.

public PdfAlign CaptionAlign { get; set; } #

Caption alignment inside the rendered table width.

public PdfColor? CaptionColor { get; set; } #

Caption text color. When null the writer's default text color is used.

public Double? CaptionFontSize { get; set; } #

Caption font size in points. When null the document default font size is used.

public Double CaptionSpacingAfter { get; set; } #

Vertical space between the caption and table grid, in points.

public Double SpacingAfter { get; set; } #

Vertical space after the table, in points.

public Double RowBaselineOffset { get; set; } #

Baseline adjustment in points to fine-tune text vertical placement.

public Double? MaxWidth { get; set; } #

Optional maximum rendered table width, in points. When null the table uses the available frame width.

public Double? PreferredWidth { get; set; } #

Optional preferred rendered table width, in points. Auto-fit tables may expand beyond this width to satisfy measured content, up to PdfTableStyle.MaxWidth or the available frame width.

public Boolean PreserveWidth { get; set; } #

When true, the resolved table frame width is preserved even if measured columns would otherwise shrink to their content.

public Boolean ShrinkTextToFit { get; set; } #

When true, table rows can reduce their font size to keep cell text within the resolved cell width.

public Double? MinimumShrinkFontSize { get; set; } #

Smallest font size, in points, used by row or cell text shrinking. When null the writer uses 6 points.

public List<PdfColumnAlign>? Alignments { get; set; } #

Optional per-column alignment; defaults to Left.

public List<PdfCellVerticalAlign>? VerticalAlignments { get; set; } #

Optional per-column vertical alignment; defaults to Top.

public List<Double?>? ColumnWidthPoints { get; set; } #

Optional fixed column widths in points. Null or missing entries are sized by relative weights.

public List<Double?>? ColumnMinWidthPoints { get; set; } #

Optional minimum column widths in points. Null or missing entries have no explicit minimum.

public List<Double?>? ColumnMaxWidthPoints { get; set; } #

Optional maximum column widths in points. Null or missing entries have no explicit maximum.

public List<Double>? ColumnWidthWeights { get; set; } #

Optional relative column width weights. Missing columns default to 1.0.

public Boolean AutoFitColumns { get; set; } #

When true, flexible column widths are weighted from measured table content using OfficeIMO.Drawing.

public Boolean RightAlignNumeric { get; set; } #

When true, cell values that look numeric are right-aligned automatically.

public Boolean KeepTogether { get; set; } #

When true, the table moves as a unit instead of splitting across pages when it fits in the page frame.

public Boolean KeepWithNext { get; set; } #

When true, the table moves with the first visible part of the following block when they fit together.

public Boolean AllowRowBreakAcrossPages { get; set; } #

When true, a single row that is taller than the page frame may split across pages by wrapped text line.

public List<Boolean?>? RowAllowBreakAcrossPages { get; set; } #

Optional per-row row-break overrides. Null entries fall back to PdfTableStyle.AllowRowBreakAcrossPages.

public Double LeftIndent { get; set; } #

Left indentation before table placement, in points. Negative values extend the table into the leading margin.

public Double HorizontalOffset { get; set; } #

Additional horizontal translation after table alignment or floating placement, in points. Positive values move the table right. This does not change its available width or vertical flow.