Comment
class Comment: PDFElement
A PDF comment element
-
The leading text of the comment
Declaration
Swift
let leadingText: NSAttributedString -
The comment text
Declaration
Swift
let commentText: NSAttributedString -
Background color
Declaration
Swift
let backgroundColor: NSColor -
Init the comment element
Declaration
Swift
init(_ commentText: String, icon: String = "", backgroundColor: NSColor = .pdfComment)Parameters
commentTextThe text of the comment
backgroundColorThe background color
iconThe icon
-
Draw the comment element as a
LabelelementDeclaration
Swift
func draw(rect: inout CGRect, calculationOnly: Bool, pageRect: CGRect)Parameters
rectThe available rectangle
calculationOnlyBool if only the Bounding Rect should be calculated
pageRectThe page size of the PDF document
View on GitHub