PDFTable

public class PDFTable : PDFDocumentObject

A table is a two dimensional list.

It can be styled and can contain different data.

  • Styling used for drawing

    Declaration

    Swift

    public var style: PDFTableStyle
  • Two-dimensional array of cells

    Declaration

    Swift

    public var cells: [[PDFTableCell]]
  • List of relative horizontal column widths.

    Values are between 0.0 and 1.0 and should sum up to 1.0 (100%)

    Declaration

    Swift

    public var widths: [CGFloat]
  • Padding is the distance between the cell content and its borders.

    Declaration

    Swift

    public var padding: CGFloat
  • Margin is the distance between the cell borders and other cells

    Declaration

    Swift

    public var margin: CGFloat
  • Header rows will be drawn on every page

    Declaration

    Swift

    public var showHeadersOnEveryPage: Bool
  • / Cells should split when overlapping page

    Declaration

    Swift

    public var shouldSplitCellsOnPageBreak: Bool
  • Count of rows and columns in this table

    The size of the table needs to be defined beforehand, so that cells can be accessed using subscript accessors

    Declaration

    Swift

    public private(set) var size: (rows: Int, columns: Int) { get }
  • Creates a new table with the given size and populates it with empty cells

    Declaration

    Swift

    public convenience init(size: (rows: Int, columns: Int))

    Parameters

    size

    Row and column count of table

  • Creates a new table with the given size and populates it with empty cells.

    Declaration

    Swift

    public init(rows: Int, columns: Int)

    Parameters

    rows

    Rows of table, must be greater than 0

    columns

    Columns of table, must be greater than 0

  • Shorthand accessor to the rows stored in cells

    Declaration

    Swift

    public var rows: PDFTableRows { get }
  • Shorthand accessor to the columns stored in cells

    Declaration

    Swift

    public var columns: PDFTableColumns { get }
  • Shorthand accessor to the cell values of this table

    Declaration

    Swift

    public var content: [[PDFTableContentable?]] { get set }
  • Shorthand accessor to the cell alignments of this table

    Declaration

    Swift

    public var alignment: [[PDFTableCellAlignment]] { get set }

Equatable

Single Row

Range

Closed Range

Partial Range From

Partial Range Up To