Text
class Text: PDFElement
A PDF text element
-
The text
Declaration
Swift
let text: NSAttributedString
-
Init the text element
Declaration
Swift
init(_ text: String, attributes: SWIFTStringAttribute = SWIFTStringAttribute())
Parameters
text
The text as
String
attributes
The
StringAttributes
for the text -
Init the text element
Declaration
Swift
init(_ text: NSAttributedString)
Parameters
text
The text as
NSAttributedString
-
Draw the text
Declaration
Swift
func draw(rect: inout CGRect, calculationOnly: Bool, pageRect: CGRect)
Parameters
rect
The available rectangle
calculationOnly
Bool if only the size should be calculated
pageRect
The page size of the PDF document