Documentation
¶
Overview ¶
Package table implements a PDF table component with colspan, rowspan, and per-cell styling.
Index ¶
- Variables
- type Cell
- type Option
- type Table
- func (t *Table) ColCount() int
- func (t *Table) ColumnWidths() []float64
- func (t *Table) GetHeight(provider core.Provider, cell *entity.Cell) float64
- func (t *Table) GetStructure() *node.Node[core.Structure]
- func (t *Table) Render(provider core.Provider, cell *entity.Cell)
- func (t *Table) SetConfig(config *entity.Config)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrTableSpanOverlap is returned when colspan/rowspan cells overlap each other. ErrTableSpanOverlap = errors.New("table: cell spans overlap") // ErrTableEmpty is returned when the cell matrix is empty. ErrTableEmpty = errors.New("table: empty cell matrix") )
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Table)
Option configures a Table.
func WithColumnWidths ¶
WithColumnWidths configures relative column widths. Values are normalized to fractions that sum to 1. Non-positive or missing values fall back to the average explicit width so partially specified tables remain usable.
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table is a core.Component that renders a grid with span support.
func (*Table) ColCount ¶
ColCount returns the number of columns determined from the normalised grid.
func (*Table) ColumnWidths ¶
ColumnWidths returns normalized column width fractions, or nil for equal widths.
func (*Table) GetStructure ¶
GetStructure returns the component node for snapshots/debugging.
Click to show internal directories.
Click to hide internal directories.