Class

PDFDocument

An object that represents PDF data or a PDF file and defines methods for writing, searching, and selecting PDF data.

Declaration

@interface PDFDocument : NSObject

Overview

The other utility classes are either instantiated from methods in PDFDocument, as are PDFPage and PDFOutline; or support it, as do PDFSelection and PDFDestination.

You initialize a PDFDocument object with PDF data or with a URL to a PDF file. You can then ask for the page count, add or delete pages, perform a find, or parse selected content into an NSString object.

Topics

Initializing Documents

- initWithURL:

Initializes a PDFDocument object with the contents at the specified URL (if the URL is invalid, this method returns NULL).

- initWithData:

Initializes a PDFDocument object with the passed-in data.

- init

Initializes a PDFDocument object.

Reading and Writing PDFs

Read Operations

Operations that let you access documents and pages, manage document security, and work with searching and selections.

Write Operations

Operations that let you write document data to different locations.

Setting the Delegate

delegate

The object acting as the delegate for the PDFDocument object.

PDFDocumentDelegate

The delegate for the PDFDocument object.

Constants

PDFDocumentPermissions

An enumeration that specifies document permissions status.

PDFDocumentAttribute

A structure that specifies document attributes.

PDFDocumentWriteOption

A structure that specifies file writing options for a document.

Notifications

Notifications posted by PDFDocument.

PDFDocumentDidUnlockNotification

A notification that a document unlocks after a unlockWithPassword: message.

PDFDocumentDidBeginPageFindNotification

A notification that a find operation begins working on a new page of a document.

PDFDocumentDidEndPageFindNotification

A notification that a find operation finishes working on a page in a document.

PDFDocumentDidFindMatchNotification

A notification that a string match is found in a document.

PDFDocumentDidBeginWriteNotification

A notification that a write operation begins working on a document.

PDFDocumentDidEndWriteNotification

A notification that a write operation finishes working on a document.

PDFDocumentDidBeginPageWriteNotification

A notification that a write operation begins working on a page in a document.

PDFDocumentDidEndPageWriteNotification

A notification that a write operation finishes working on a page in a document.

Relationships

Inherits From

Conforms To

See Also

Content Model

PDFPage

PDFPage, a subclass of NSObject, defines methods used to render PDF pages and work with annotations, text, and selections.

PDFOutline

A PDFOutline object is an element in a tree-structured hierarchy that can represent the structure of a PDF document.

PDFSelection

A PDFSelection object identifies a contiguous or noncontiguous selection of text in a PDF document.