PDFSimpleText

public class PDFSimpleText : PDFText

Text and spacing of a text object.

Use this class for simple and quick text drawing

  • Text to be drawn

    Declaration

    Swift

    public var text: String
  • Line spacing if multiple lines

    Declaration

    Swift

    public var spacing: CGFloat
  • Weak reference to style used by this text object

    Declaration

    Swift

    public weak var style: PDFTextStyle?
  • Initalizer

    Declaration

    Swift

    public init(text: String, spacing: CGFloat = 0, style: PDFTextStyle? = nil)

    Parameters

    text

    Text to be drawn

    spacing

    Spacing between text lines, defaults to 0

    style

    Reference to style, defaults to nil

  • Creates a new PDFSimpleText with the same properties

    Declaration

    Swift

    override public var copy: PDFText { get }

Equatable

  • Compares two instances of PDFSimpleText for equality

    Declaration

    Swift

    override public func isEqual(to other: PDFDocumentObject) -> Bool

    Parameters

    other

    Another instance of PDFSimpleText

    Return Value

    true, if attributes, tag, text and spacing equal; otherwise false

  • Undocumented

    Declaration

    Swift

    public static func == (lhs: PDFSimpleText, rhs: PDFSimpleText) -> Bool