PDFSectionColumn
public class PDFSectionColumn : PDFDocumentObject
A configurable column of a PDFSection
-
Holds the relative column width.
Value is between
0.0
and1.0
.Declaration
Swift
public private(set) var width: CGFloat { get }
-
Background color of this section
Declaration
Swift
public var backgroundColor: Color?
-
Creates a new section column with the given relative width.
Declaration
Swift
public init(width: CGFloat)
Parameters
width
See
width
for details
-
Adds a empty space in the given container, between the previous and the next element
Declaration
Swift
public func add(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, space: CGFloat)
Parameters
container
Container where the space will be set, defaults to
PDFSectionColumnContainer.left
space
Space distance in points
-
Adds a horizontal line spearator to the given container. The line starts at the left indentation and ends at the right indentation. Customize by adjusting parameter
style
.Declaration
Swift
public func addLineSeparator(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, style: PDFLineStyle)
Parameters
container
Container where the space will be set, defaults to
PDFSectionColumnContainer.left
style
Style of line
-
Adds an image to the given container.
Declaration
Swift
public func add(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, image: PDFImage)
Parameters
container
Container where the space will be set, defaults to
PDFSectionColumnContainer.left
image
Image object
-
Adds an image row to the given container. This image row will fill the full available width between left indentation and right indentation.
Declaration
Swift
public func add(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, imagesInRow images: [PDFImage], spacing: CGFloat = 5.0)
Parameters
container
Container where the space will be set
images
Array of images, from left to
spacing
Horizontal distance between images
-
Shorthand public function to add a String text to the given container
Declaration
Swift
public func add(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, text: String, lineSpacing: CGFloat = 1.0)
Parameters
container
Container where the space will be set, defaults to
PDFSectionColumnContainer.left
images
Array of images, from left to right
spacing
Horizontal distance between images
-
Adds an text object to the given container
Declaration
Swift
public func add(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, textObject: PDFSimpleText)
Parameters
container
Container where the space will be set
textObject
Simple text object
-
Shorthand public function to add a attributed String text to the given container
Declaration
Swift
public func add(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, attributedText: NSAttributedString)
Parameters
container
Container where the space will be set
text
An attributed string
-
Adds an attributed text object to the given container
Declaration
Swift
public func add(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, attributedTextObject: PDFAttributedText)
Parameters
container
Container where the space will be set, defaults to
PDFContainer.contentLeft
textObject
Attributed text object
-
Set font in given container. This text color will be used when adding a
PDFSimpleText
Declaration
Swift
public func set(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, font: Font)
Parameters
container
Container where the font will be set, defaults to
PDFContainer.contentLeft
font
Font of text
-
Reset text color in given container to default.
Declaration
Swift
public func resetFont(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left)
Parameters
container
Container whose text color will be reset, defaults to
PDFContainer.contentLeft
-
Set text color in given container. This text color will be used when adding a
PDFSimpleText
Declaration
Swift
public func set(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, textColor: Color)
Parameters
container
Container where the text color will be set, defaults to
PDFContainer.contentLeft
color
Color of the text
-
Reset text color in given container to default.
Declaration
Swift
public func resetTextColor(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left)
Parameters
container
Container whose text color will be reset, defaults to
PDFContainer.contentLeft
-
Adds a table object to the document in the defined container
Declaration
Swift
public func add(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, table: PDFTable)
Parameters
container
Container where the table color will be added, defaults to
PDFContainer.contentLeft
color
Table to add to document
-
Adds a list object to the document in the defined container
Declaration
Swift
public func add(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, list: PDFList)
Parameters
container
Container where the text color will be set, defaults to
PDFContainer.contentLeft
color
Color of the text
-
Change the indentation in a container, use the parameter
left
to define from which side.Declaration
Swift
public func set(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, indent: CGFloat, left: Bool)
Parameters
container
Container whose indentation should be changed, defaults to
PDFContainer.contentLeft
indent
Points from the side
left
If
true
then the left side indentation is set, else the right indentation is set -
Change the absolute top offset in a container
Declaration
Swift
public func set(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, absoluteOffset: CGFloat)
Parameters
container
Container whose current absoilute offset should be changed, defaults to
PDFContainer.contentLeft
absoluteOffset
Points from the top
-
Adds a group
Declaration
Swift
public func add(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, group: PDFGroup)
Parameters
container
Container where the group will be added
group
Instance of
PDFGroup
to add