PDFSimpleText
public class PDFSimpleText : PDFText
Plain text object with basic styling.
The text of a PDFSimpleText
will be styled using either the referenced PDFTextStyle
set on style
, or otherwise using the
styling of the parent container.
Use this class for simple text drawing.
For advanced use cases see PDFAttributedText
.
-
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?
-
Creates a new simple text object
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
PDFTextStyle
, defaults tonil
-
Creates a new
PDFSimpleText
with the same propertiesDeclaration
Swift
override public var copy: PDFText { get }
-
nodoc
Declaration
Swift
override public func isEqual(to other: PDFDocumentObject) -> Bool
-
nodoc
Declaration
Swift
override public func hash(into hasher: inout Hasher)
-
nodoc
Declaration
Swift
static func == (lhs: PDFSimpleText, rhs: PDFSimpleText) -> Bool