CatNiP prefinal
Sähköinen nuottikirja, HY-TKTKL-OHTUPROJ KESÄ11
UIDocumentPDF Class Reference

A concrete subclass of UIDocument that handles PDF type documents. More...

#import <UIDocumentPDF.h>

Inheritance diagram for UIDocumentPDF:
Collaboration diagram for UIDocumentPDF:

List of all members.

Public Member Functions

(void) - dealloc [implementation]
(UIImage *) - getImageOfPage: [implementation]
 Draws and returns an image of the specified page of the document.
(CGSize) - getSizeOfPage: [implementation]
 Returns the size of the specified page.
(id) - init [implementation]
 Initializes the internal variables of the object.
(id) - initWithCGPDFDocument:
 Initializes and returns the document object with the specified Quartz PDF document reference.
(id) - initWithContentsOfFile: [implementation]
 Initializes and returns the document object with the contents of the specified PDF file.
(id) - initWithData: [implementation]
 Initializes and returns the document object with the specified PDF data.

Static Public Member Functions

(UIDocumentPDF *) + documentWithCGPDFDocument:
 Creates and returns a document object representing the specified Quartz PDF document.

Protected Attributes

CGPDFDocumentRef document

Properties

CGPDFBox box
 The PDF box type to use for the pages in this document.
CGPDFDocumentRef CGPDFDocument
 The underlying Quartz PDF document data.

Detailed Description

A concrete subclass of UIDocument that handles PDF type documents.

Created by Lari O Rasku, tkol on 6/13/11. Copyright 2011 __MyCompanyName__. All rights reserved.

Definition at line 12 of file UIDocumentPDF.h.


Member Function Documentation

- (void) dealloc [implementation]

Definition at line 189 of file UIDocumentPDF.m.

References document.

+ (UIDocumentPDF *) documentWithCGPDFDocument: (CGPDFDocumentRef)  CGPDFDocument

Creates and returns a document object representing the specified Quartz PDF document.

Parameters:
CGPDFDocumentThe Quartz PDF document object.
Returns:
A new document object for the specified Quartz PDF document, or nil if the method could not initialize the document from the specified PDF document reference.

Definition at line 26 of file UIDocumentPDF.m.

- (UIImage *) getImageOfPage: (int)  pageNumber [implementation]

Draws and returns an image of the specified page of the document.

Parameters:
pageNumberThe number of the page, starting from 1.
Returns:
An autoreleased UIImage object that contains a graphical representation of the specified page. The orientation of the page is taken into account.

Reimplemented from UIDocument.

Definition at line 125 of file UIDocumentPDF.m.

References box, document, and getSizeOfPage:.

Here is the call graph for this function:

- (CGSize) getSizeOfPage: (int)  pageNumber [implementation]

Returns the size of the specified page.

Parameters:
pageNumberThe number of the page, starting from 1.
Returns:
The dimensions of the specified page, in points, with page orientation taken into account.

Reimplemented from UIDocument.

Definition at line 165 of file UIDocumentPDF.m.

References box, document, and MAX_PAGE_WIDTH.

Here is the caller graph for this function:

- (id) init [implementation]

Initializes the internal variables of the object.

Do not use this method to initialize new instances of the object. It only encapsulates common initialization code and does not actually load a PDF document into the object. Use initWithCGPDFDocument, initWithContentsOfFile or initWithData instead.

Returns:
The initialized object.

Definition at line 40 of file UIDocumentPDF.m.

References box.

Here is the caller graph for this function:

- (id) initWithCGPDFDocument: (CGPDFDocumentRef)  CGPDFDocument

Initializes and returns the document object with the specified Quartz PDF document reference.

Parameters:
CGPDFDocumentA Quartz PDF document reference.
Returns:
An initialized document object, or nil if the method could not initialize the document from the specified data.

Definition at line 53 of file UIDocumentPDF.m.

References CGPDFDocument, document, getSizeOfPage:, init, UIDocument::numberOfPages, and UIDocument::size.

Here is the call graph for this function:

Here is the caller graph for this function:

- (id) initWithContentsOfFile: (NSString *)  path [implementation]

Initializes and returns the document object with the contents of the specified PDF file.

Parameters:
pathThe path to the file.
Returns:
An initialized document object, or nil if the method could not find the file or initialize the document from its contents.

Reimplemented from UIDocument.

Definition at line 80 of file UIDocumentPDF.m.

References initWithCGPDFDocument:.

Here is the call graph for this function:

- (id) initWithData: (NSData *)  data [implementation]

Initializes and returns the document object with the specified PDF data.

Parameters:
dataThe data object containing the document data.  
Returns:
An initialized document object, or nil if the method could not initialize the document from the specified data.

Reimplemented from UIDocument.

Definition at line 102 of file UIDocumentPDF.m.

References initWithCGPDFDocument:.

Here is the call graph for this function:


Member Data Documentation

- (CGPDFDocumentRef) document [protected]

Definition at line 13 of file UIDocumentPDF.h.


Property Documentation

- (CGPDFBox) box [read, write, assign]

The PDF box type to use for the pages in this document.

Default is kCGPDFMediaBox.

Definition at line 14 of file UIDocumentPDF.h.

- (CGPDFDocumentRef) CGPDFDocument [read, assign]

The underlying Quartz PDF document data.

(read-only)

Definition at line 18 of file UIDocumentPDF.h.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Properties Defines