CatNiP prefinal
Sähköinen nuottikirja, HY-TKTKL-OHTUPROJ KESÄ11
|
A concrete subclass of UIDocument that handles PDF type documents. More...
#import <UIDocumentPDF.h>
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. |
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.
- (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.
CGPDFDocument | The Quartz PDF document object. |
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.
pageNumber | The number of the page, starting from 1. |
Reimplemented from UIDocument.
Definition at line 125 of file UIDocumentPDF.m.
References box, document, and getSizeOfPage:.
- (CGSize) getSizeOfPage: | (int) | pageNumber | [implementation] |
Returns the size of the specified page.
pageNumber | The number of the page, starting from 1. |
Reimplemented from UIDocument.
Definition at line 165 of file UIDocumentPDF.m.
References box, document, and MAX_PAGE_WIDTH.
- (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.
Definition at line 40 of file UIDocumentPDF.m.
References box.
- (id) initWithCGPDFDocument: | (CGPDFDocumentRef) | CGPDFDocument |
Initializes and returns the document object with the specified Quartz PDF document reference.
CGPDFDocument | A Quartz PDF document reference. |
Definition at line 53 of file UIDocumentPDF.m.
References CGPDFDocument, document, getSizeOfPage:, init, UIDocument::numberOfPages, and UIDocument::size.
- (id) initWithContentsOfFile: | (NSString *) | path | [implementation] |
Initializes and returns the document object with the contents of the specified PDF file.
path | The path to the file. |
Reimplemented from UIDocument.
Definition at line 80 of file UIDocumentPDF.m.
References initWithCGPDFDocument:.
- (id) initWithData: | (NSData *) | data | [implementation] |
Initializes and returns the document object with the specified PDF data.
data | The data object containing the document data. |
Reimplemented from UIDocument.
Definition at line 102 of file UIDocumentPDF.m.
References initWithCGPDFDocument:.
- (CGPDFDocumentRef) document [protected] |
Definition at line 13 of file UIDocumentPDF.h.
- (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] |