Cell

Overview

Cell is a type in Aspose.PDF FOSS for Go.

Cell is a single cell within a Row.

This type provides 20 methods for working with Cell objects in Go programs. Available methods include: Background, Border, ColSpan, Image, Margin, Row, RowSpan, SetBackground, SetBorder, SetColSpan, SetHAlign, SetImage, and 8 additional methods. All public members are accessible to any Go application after installing the Aspose.PDF FOSS for Go package.

Methods

SignatureDescription
Row()*RowRow returns the owning row.
SetText(text: string)*CellSets the text value.
Text()stringReturns the text.
SetTextStyle(s: TextStyle)*CellSetTextStyle overrides the table’s DefaultCellStyle for this cell.
TextStyle()*TextStyleTextStyle returns the per-cell style override (or nil if the cell inherits the table default).
SetBackground(col: *Color)*CellSets the background value.
Background()*ColorReturns the background.
SetBorder(b: BorderInfo)*CellSets the border value.
Border()*BorderInfoReturns the border.
SetMargin(m: MarginInfo)*CellSets the margin value.
Margin()*MarginInfoReturns the margin.
SetHAlign(h: HAlign)*CellSets the h align value.
SetVAlign(v: VAlign)*CellSets the v align value.
SetColSpan(n: int)*CellSetColSpan sets the column span (cells the cell occupies horizontally).
ColSpan()intColSpan returns the cell’s column span (1 if unset).
SetRowSpan(n: int)*CellSetRowSpan sets the row span (rows the cell occupies vertically).
RowSpan()intRowSpan returns the cell’s row span (1 if unset).
SetImage(path: string)*CellSetImage configures the cell to render the named image instead of text.
SetImageFromStream(r: io.Reader)*CellSetImageFromStream is the io.Reader-based counterpart.
Image()(path string, hasImage bool)Image returns the configured image source.

See Also