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
and1.0
and should sum up to1.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 }
-
nodoc
Declaration
Swift
override public func isEqual(to other: PDFDocumentObject) -> Bool
-
Accessor for a specific
PDFTableCell
at the given positionDeclaration
Swift
subscript(position position: PDFTableCellPosition) -> PDFTableCell { get set }
Parameters
position
PDFTableCellPosition
with row and column indexReturn Value
PDFTableCell
at the given position -
Accessor for a specific cell at the given position
Declaration
Swift
subscript(row: Int, column: Int) -> PDFTableCell { get set }
Parameters
row
Index of row
column
Index of column
Return Value
PDFTableCell
at the given position -
Accessor for a specific column
Declaration
Swift
subscript(column index: Int) -> PDFTableColumn { get set }
Parameters
column
Index of column
Return Value
PDFTableColumn
with references to cells of this table -
Accessors of columns in the given range.
Declaration
Swift
subscript(columns range: ClosedRange<Int>) -> PDFTableColumns { get set }
Parameters
columns
Range of indicies
Return Value
PDFTableColumns
with references to columns -
Accessors of columns in the given range.
Declaration
Swift
subscript(columns range: PartialRangeFrom<Int>) -> PDFTableColumns { get set }
Parameters
columns
Range of indicies
Return Value
PDFTableColumns
with references to columns -
Accessors of columns in the given range.
Declaration
Swift
subscript(columns range: PartialRangeThrough<Int>) -> PDFTableColumns { get set }
Parameters
columns
Range of indicies
Return Value
PDFTableColumns
with references to columns -
Accessors of columns in the given range.
Declaration
Swift
subscript(columns range: PartialRangeUpTo<Int>) -> PDFTableColumns { get set }
Parameters
columns
Range of indicies
Return Value
PDFTableColumns
with references to columns -
Accessors of columns in the given range.
Declaration
Swift
subscript(columns range: Range<Int>) -> PDFTableColumns { get set }
Parameters
columns
Range of indicies
Return Value
PDFTableColumns
with references to columns -
Accessor for a specific row
Declaration
Swift
subscript(row index: Int) -> PDFTableRow { get set }
Parameters
row
Index of row
Return Value
PDFTableRow
with references to cells of this table -
Accessor for multiple rows in the given range
rows
Declaration
Swift
subscript(rows range: ClosedRange<Int>) -> PDFTableRows { get set }
Parameters
rows
Range of indicies
Return Value
PDFTableRows
with references to rows -
Accessor for multiple rows in the given range
rows
Declaration
Swift
subscript(rows range: PartialRangeFrom<Int>) -> PDFTableRows { get set }
Parameters
rows
Range of indicies
Return Value
PDFTableRows
with references to rows -
Accessor for multiple rows in the given range
rows
Declaration
Swift
subscript(rows range: PartialRangeThrough<Int>) -> PDFTableRows { get set }
Parameters
rows
Range of indicies
Return Value
PDFTableRows
with references to rows -
Accessor for multiple rows in the given range
rows
Declaration
Swift
subscript(rows range: PartialRangeUpTo<Int>) -> PDFTableRows { get set }
Parameters
rows
Range of indicies
Return Value
PDFTableRows
with references to rows -
Accessor for multiple rows in the given range
rows
Declaration
Swift
subscript(rows range: Range<Int>) -> PDFTableRows { get set }
Parameters
rows
Range of indicies
Return Value
PDFTableRows
with references to rows
-
Declaration
Swift
subscript(rows row: Int, columns columns: Range<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows row: Int, columns columns: ClosedRange<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows row: Int, columns columns: PartialRangeFrom<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows row: Int, columns columns: PartialRangeThrough<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows row: Int, columns columns: PartialRangeUpTo<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells
-
Declaration
Swift
subscript(rows rows: Range<Int>, columns columns: ClosedRange<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: Range<Int>, columns columns: PartialRangeFrom<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: Range<Int>, columns columns: PartialRangeThrough<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: Range<Int>, columns columns: PartialRangeUpTo<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: Range<Int>, column column: Int) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells
-
Declaration
Swift
subscript(rows rows: ClosedRange<Int>, columns columns: Range<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: ClosedRange<Int>, columns columns: ClosedRange<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: ClosedRange<Int>, columns columns: PartialRangeFrom<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: ClosedRange<Int>, columns columns: PartialRangeThrough<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: ClosedRange<Int>, columns columns: PartialRangeUpTo<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: ClosedRange<Int>, column column: Int) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells
-
Declaration
Swift
subscript(rows rows: PartialRangeFrom<Int>, columns columns: Range<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: PartialRangeFrom<Int>, columns columns: ClosedRange<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: PartialRangeFrom<Int>, columns columns: PartialRangeFrom<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: PartialRangeFrom<Int>, columns columns: PartialRangeThrough<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: PartialRangeFrom<Int>, columns columns: PartialRangeUpTo<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: PartialRangeFrom<Int>, column column: Int) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells
-
Declaration
Swift
subscript(rows rows: PartialRangeUpTo<Int>, columns columns: Range<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: PartialRangeUpTo<Int>, columns columns: ClosedRange<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: PartialRangeUpTo<Int>, columns columns: PartialRangeFrom<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: PartialRangeUpTo<Int>, columns columns: PartialRangeThrough<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: PartialRangeUpTo<Int>, columns columns: PartialRangeUpTo<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: PartialRangeUpTo<Int>, column column: Int) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells -
Declaration
Swift
subscript(rows rows: Range<Int>, columns columns: Range<Int>) -> PDFTableSection { get set }
Parameters
rows
Range of indicies
columns
Range of indicies
Return Value
PDFTableSection
with references to cells