Instance Method

initWithData:

Initializes a PDFDocument object with the passed-in data.

Declaration

- (instancetype)initWithData:(NSData *)data;

Return Value

A PDFDocument instance initialized with the passed-in PDF data, or NULL if the object could not be initialized.

Discussion

The data must be PDF data encapsulated in an NSData object; otherwise this method returns NULL.

See Also

Initializing Documents

- initWithURL:

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

- init

Initializes a PDFDocument object.