TechnologiesGraphics, Imaging & Compositing

PDFKit

iOSmacOStvOSwatchOSvisionOS

PDFKit lets you display, edit, and manipulate PDF documents in your iOS, macOS, tvOS, and visionOS apps, with built-in views, pages, find interaction, and document outlines. You work with annotations through PDFAnnotation and its subtypes such as PDFAnnotationFreeText, PDFAnnotationInk, PDFAnnotationLink, and PDFAnnotationStamp, and configure their appearance with types like PDFBorder and PDFAppearanceCharacteristics. To wire up navigation and interactivity, you use actions such as PDFActionGoTo, PDFActionURL, and PDFActionResetForm together with PDFDestination. PDFDocumentPermissions and related types let you account for a document's access constraints as you read and modify it.

Essentials 7

The core document, page, and view objects you use to load, display, and navigate PDF content.

  • Cl
    PDFDocumentmacOS 10.4+
    An object that represents a PDF document and provides access to its pages, outline, and metadata.
  • Cl
    PDFPagemacOS 10.4+
    An object that represents a single page of a PDF document and its content.
  • Cl
    PDFViewmacOS 10.4+
    A view that displays the contents of a PDF document and supports scrolling and selection.
  • Cl
    PDFThumbnailViewmacOS 10.5+
    A view that displays thumbnail images of a document's pages for navigation.
  • Cl
    PDFOutlinemacOS 10.4+
    An object that represents a node in a document's hierarchical outline, or table of contents.
  • Cl
    PDFSelectionmacOS 10.4+
    An object that represents a selected range of text or content within a document.
  • Cl
    PDFDestinationmacOS 10.4+
    An object that identifies a specific point on a page used as a navigation target.

View Delegates and Overlays 3

Protocols that let you respond to view and document events and supply custom per-page overlays.

  • Pr
    PDFViewDelegate
    A protocol that lets a delegate respond to user interaction and navigation in a PDF view.
  • Pr
    PDFDocumentDelegate
    A protocol that lets a delegate respond to events from a PDF document.
  • Pr
    PDFPageOverlayViewProvidermacOS 13.0+
    A protocol that supplies custom overlay views to draw on top of individual pages.

Annotations 14

The base annotation class and its concrete subtypes for marking up, drawing on, and adding form fields to pages.

  • Cl
    PDFAnnotationmacOS 10.4+
    A base class that represents an annotation attached to a page in a PDF document.
  • Cl
    PDFAnnotationFreeText
    An annotation that displays editable free text directly on a page.
  • Cl
    PDFAnnotationInk
    An annotation that captures freehand ink drawings made up of one or more paths.
  • Cl
    PDFAnnotationLink
    An annotation that links a region of a page to an action or destination.
  • Cl
    PDFAnnotationStamp
    An annotation that places a stamp image or label on a page.
  • Cl
    PDFAnnotationText
    An annotation that displays a note as a small icon that opens a pop-up.
  • Cl
    PDFAnnotationMarkup
    An annotation that highlights, underlines, or strikes through selected text.
  • Cl
    PDFAnnotationLine
    An annotation that draws a straight line with optional start and end styles.
  • Cl
    PDFAnnotationCircle
    An annotation that draws a circle or ellipse on a page.
  • Cl
    PDFAnnotationSquare
    An annotation that draws a rectangle or square on a page.
  • Cl
    PDFAnnotationPopup
    An annotation that displays a pop-up note associated with a parent annotation.
  • Cl
    PDFAnnotationButtonWidget
    A widget annotation that represents an interactive button form control on a page.
  • Cl
    PDFAnnotationChoiceWidget
    A widget annotation that represents an interactive list or pop-up choice form control.
  • Cl
    PDFAnnotationTextWidget
    A widget annotation that represents an interactive text field form control.

Annotation Appearance 7

Types that describe an annotation's borders, widget appearance, and named property keys.

  • Cl
    PDFBordermacOS 10.4+
    An object that describes the style, width, and dash pattern of an annotation's border.
  • Cl
    PDFAppearanceCharacteristicsmacOS 10.13+
    An object that describes the visual appearance characteristics of a widget annotation.
  • St
    PDFAnnotationKey
    A structure of keys that identify properties of a PDF annotation.
  • St
    PDFAnnotationSubtype
    A structure of constants that identify the subtype of a PDF annotation.
  • St
    PDFAnnotationWidgetSubtype
    A structure of constants that identify the subtype of a widget annotation.
  • St
    PDFAppearanceCharacteristicsKey
    A structure of keys that identify appearance characteristics of a widget annotation.
  • St
    PDFBorderKey
    A structure of keys that identify properties of an annotation border.

Annotation Style Constants 9

Constants and enumerations that specify line, markup, border, and widget styling for annotations.

  • St
    PDFAnnotationLineEndingStyle
    A structure of constants that specify the style of an annotation line's endpoints.
  • St
    PDFAnnotationTextIconType
    A structure of constants that specify the icon shown for a text annotation.
  • St
    PDFAnnotationHighlightingMode
    A structure of constants that specify how a widget annotation highlights when activated.
  • En
    PDFLineStyle
    Constants that specify the endpoint style of a line annotation.
  • En
    PDFTextAnnotationIconType
    Constants that specify the icon displayed by a text annotation.
  • En
    PDFMarkupType
    Constants that specify the type of a markup annotation, such as highlight or underline.
  • En
    PDFWidgetControlType
    Constants that specify the control type of a widget annotation.
  • En
    PDFWidgetCellState
    Constants that specify the on or off state of a widget annotation cell.
  • En
    PDFBorderStylemacOS 10.4+
    Constants that specify the visual style of an annotation's border.

Actions 7

The action base class and its subtypes that drive navigation and interactivity within a document.

  • Cl
    PDFActionmacOS 10.5+
    An abstract class that represents an action triggered by an annotation or outline item.
  • Cl
    PDFActionGoTomacOS 10.5+
    An action that navigates to a destination within the current document.
  • Cl
    PDFActionNamedmacOS 10.5+
    An action that performs a named, predefined operation such as go to next or first page.
  • Cl
    PDFActionRemoteGoTomacOS 10.5+
    An action that navigates to a destination in a separate PDF document.
  • Cl
    PDFActionResetFormmacOS 10.5+
    An action that resets the values of form fields in a document.
  • Cl
    PDFActionURLmacOS 10.5+
    An action that opens a URL, such as a web address, when triggered.
  • En
    PDFActionNamedNamemacOS 10.5+
    Constants that specify the predefined operation performed by a named action.

Document Attributes and Permissions 4

Types that describe document metadata, write options, and access constraints when reading or modifying a PDF.

  • St
    PDFDocumentAttribute
    A structure of keys that identify metadata attributes of a PDF document.
  • St
    PDFDocumentWriteOption
    A structure of keys that specify options for writing a document to disk.
  • En
    PDFDocumentPermissionsmacOS 10.4+
    Constants that specify the access permission level granted by a document.
  • En
    PDFAccessPermissions
    An option set that describes the specific access operations a document allows.

Display and Selection Options 7

Enumerations that configure how content is laid out, rendered, and selected in a view.

  • En
    PDFDisplayBoxmacOS 10.4+
    Constants that specify which page box, such as media or crop, is used for display.
  • En
    PDFDisplayModemacOS 10.4+
    Constants that specify how pages are laid out in a PDF view.
  • En
    PDFDisplayDirectionmacOS 10.13+
    Constants that specify whether pages scroll vertically or horizontally.
  • En
    PDFSelectionGranularitymacOS 15.0+
    Constants that specify the granularity of a text selection, such as character or word.
  • St
    PDFAreaOfInterestmacOS 10.4+
    An option set that describes the kinds of content under a point in a PDF view.
  • En
    PDFInterpolationQualitymacOS 10.7+
    Constants that specify the image interpolation quality used when rendering content.
  • En
    PDFPrintScalingModemacOS 10.4+
    Constants that specify how page content is scaled when printing a document.

Extends 1

NSNotification
← Graphics, Imaging & Compositing