Class

PDFView

An object that encapsulates the functionality of PDF Kit into a single widget that you can add to your application using Interface Builder.

Declaration

iOS, Mac Catalyst
@interface PDFView : UIView
macOS
@interface PDFView : NSView

Overview

PDFView may be the only class you need to deal with for adding PDF functionality to your application. It lets you display PDF data and allows users to select content, navigate through a document, set zoom level, and copy textual content to the Pasteboard. PDFView also keeps track of page history.

You can subclass PDFView to create a custom PDF viewer.

You can also create a custom PDF viewer by using the PDF Kit utility classes directly and not using PDFView at all.

Topics

Associating a Document with a View

document

Returns the document associated with a PDFView object.

- takePasswordFrom:

Unlocks with the password from the specified sender.

Deprecated

Configuring Document View

Configurations

Define display modes, scaling, rendering, printing and graphics properties.

Interacting in a View

Document Interactions

Handle selections, work with annotation actions, convert page and view points, and work with mouse events in a document.

Navigating Within a Document

currentPage

Returns the current page.

currentDestination

Returns a PDFDestination object representing the current page and the current point in the view specified in page space.

visiblePages

Returns an array of PDFPage objects that represent the currently visible pages.

Navigation

Operations for moving through page history and seeking to a page in a document.

Setting the Delegate

delegate

Returns the view’s delegate.

PDFViewDelegate

The delegate for the PDFView object.

Notifications

A PDFView object posts the following notifications:

PDFViewChangedHistoryNotification

A notification posted when the page history changes.

PDFViewDocumentChangedNotification

A notification posted when a new document is associated with the view.

PDFViewPageChangedNotification

A notification posted when a new page becomes the current page.

PDFViewScaleChangedNotification

A notification posted when the scale factor changes.

PDFViewAnnotationHitNotification

A notification posted when the user clicks on an annotation.

PDFViewCopyPermissionNotification

A notification posted when the user attempts to copy to the pasteboard without the appropriate permissions.

PDFViewPrintPermissionNotification

A notification posted when the user attempts to print without the appropriate permissions.

PDFViewAnnotationWillHitNotification

A notification posted before the user clicks an annotation.

PDFViewSelectionChangedNotification

A notification posted when the current selection has changed.

PDFViewDisplayModeChangedNotification

A notification posted when the display mode has changed.

PDFViewDisplayBoxChangedNotification

A notification posted when the display box has changed.

PDFViewVisiblePagesChangedNotification

A notification posted when the visible pages have changed.

Instance Properties

See Also

Views

PDFThumbnailView

A PDFThumbnailView object contains a set of thumbnails, each of which represents a page in a PDF document.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software