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 of DrawingContext will be passed to the provided closure. That instance is only valid during the lifetime of that closure.

    Each instance of DrawingContext is bound to some PDFPage, hence you can use it to perform drawing operations on only one page.

    See more

    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, the Date value is converted to String using this formatter.

    Example:

    Assume we have 2017, March 27, 18:32:30 in the YEKT time zone (UTC/GMT +5 hours). PDFDateFormatter will transform this date as D:20170327183230+05'00’ and vice versa.

    See more

    Declaration

    Swift

    public final class PDFDateFormatter : Formatter
  • A handle to operate on a document object.

    See more

    Declaration

    Swift

    public final class PDFDocument
  • A class that is used to manipulate an individual page.

    See more

    Declaration

    Swift

    public final class PDFPage