Classes
The following classes are available globally.
-
The
DrawingContext
class represents a PDF drawing destination.You cannot initialize the context directly. You need to call the
PDFDocument.addPage(_:)
method; an instance ofDrawingContext
will be passed to the provided closure. That instance is only valid during the lifetime of that closure.Each instance of
See moreDrawingContext
is bound to somePDFPage
, hence you can use it to perform drawing operations on only one page.Declaration
Swift
public final class DrawingContext
-
The
PDFDateFormatter
class generates and parses string representations of dates that are used as the PDF metadata. For example, when setting a creation date of a document, theDate
value is converted toString
using this formatter.Example:
Assume we have 2017, March 27, 18:32:30 in the YEKT time zone (UTC/GMT +5 hours).
See morePDFDateFormatter
will transform this date asD:20170327183230+05'00’
and vice versa.Declaration
Swift
public final class PDFDateFormatter : Formatter
-
A handle to operate on a document object.
See moreDeclaration
Swift
public final class PDFDocument