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: PDFStringAttribute = PDFStringAttribute())Parameters
textThe text as
StringattributesThe
PDFStringAttributefor the text -
Init the text element
Declaration
Swift
init(_ text: NSAttributedString)Parameters
textThe text as
NSAttributedString -
Draw the text
Declaration
Swift
func draw(rect: inout CGRect, calculationOnly: Bool, pageRect: CGRect)Parameters
rectThe available rectangle
calculationOnlyBool if only the size should be calculated
pageRectThe page size of the PDF document
View on GitHub