PDFSectionColumn
public class PDFSectionColumn : PDFDocumentObject
A configurable column of a PDFSection
-
Holds the relative column width.
Value is between
0.0and1.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
widthSee
widthfor 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
containerContainer where the space will be set, defaults to
PDFSectionColumnContainer.leftspaceSpace 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
containerContainer where the space will be set, defaults to
PDFSectionColumnContainer.leftstyleStyle of line
-
Adds an image to the given container.
Declaration
Swift
public func add(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, image: PDFImage)Parameters
containerContainer where the space will be set, defaults to
PDFSectionColumnContainer.leftimageImage 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
containerContainer where the space will be set
imagesArray of images, from left to
spacingHorizontal 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
containerContainer where the space will be set, defaults to
PDFSectionColumnContainer.leftimagesArray of images, from left to right
spacingHorizontal distance between images
-
Adds an text object to the given container
Declaration
Swift
public func add(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, textObject: PDFSimpleText)Parameters
containerContainer where the space will be set
textObjectSimple 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
containerContainer where the space will be set
textAn attributed string
-
Adds an attributed text object to the given container
Declaration
Swift
public func add(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, attributedTextObject: PDFAttributedText)Parameters
containerContainer where the space will be set, defaults to
PDFContainer.contentLefttextObjectAttributed text object
-
Set font in given container. This text color will be used when adding a
PDFSimpleTextDeclaration
Swift
public func set(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, font: Font)Parameters
containerContainer where the font will be set, defaults to
PDFContainer.contentLeftfontFont of text
-
Reset text color in given container to default.
Declaration
Swift
public func resetFont(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left)Parameters
containerContainer 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
PDFSimpleTextDeclaration
Swift
public func set(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, textColor: Color)Parameters
containerContainer where the text color will be set, defaults to
PDFContainer.contentLeftcolorColor of the text
-
Reset text color in given container to default.
Declaration
Swift
public func resetTextColor(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left)Parameters
containerContainer 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
containerContainer where the table color will be added, defaults to
PDFContainer.contentLeftcolorTable 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
containerContainer where the text color will be set, defaults to
PDFContainer.contentLeftcolorColor of the text
-
Change the indentation in a container, use the parameter
leftto define from which side.Declaration
Swift
public func set(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, indent: CGFloat, left: Bool)Parameters
containerContainer whose indentation should be changed, defaults to
PDFContainer.contentLeftindentPoints from the side
leftIf
truethen 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
containerContainer whose current absoilute offset should be changed, defaults to
PDFContainer.contentLeftabsoluteOffsetPoints from the top
-
Adds a group
Declaration
Swift
public func add(_ container: PDFSectionColumnContainer = PDFSectionColumnContainer.left, group: PDFGroup)Parameters
containerContainer where the group will be added
groupInstance of
PDFGroupto add
View on GitHub
Install in Dash