ContentItem
class ContentItem: PDFElement
A PDF content item element
This element is not drawing anything but stores item information in the PageCounter
class for creating a TOC
- Store the first page number of the item
-
Information about the item
Declaration
Swift
let tocInfo: TOCInfo
-
The
PageCounter
classDeclaration
Swift
let counter: PDFBuild.PageCounter
-
Init the content item element
Declaration
Swift
init(tocInfo: TOCInfo, counter: PDFBuild.PageCounter)
Parameters
item
Information about the item
counter
The
PageCounter
class -
Draw the item section element
Note
This is not drawing anything but storing item information in thePageCounter
class for creating a TOCDeclaration
Swift
func draw(rect: inout CGRect, calculationOnly: Bool, pageRect: CGRect)
Parameters
rect
The available rectangle
calculationOnly
Bool if only the Bounding Rect should be calculated
pageRect
The page size of the PDF document