CPDFPage Class Reference
| Inherits from | NSObject | 
|---|---|
| Declared in | CPDFPage.h | 
Overview
CPDFPage, a subclass of NSObject, defines methods used to render PDF pages and work with annotations, text, and selections.
CPDFPage is a logical representation of a PDF document’s page. Your application instantiates a CPDFPage object by asking for one from a CPDFDocument object. For simple display and navigation of PDF documents within your application, you don’t need to use CPDFPage. You need only use CPDFView.
  document
	Returns the CPDFDocument object with which the page is associated.
@property (nonatomic, readonly) CPDFDocument *documentDiscussion
Returns the CPDFDocument object with which the page is associated.
Declared In
CPDFPage.h
  label
	Returns the label for the page.
@property (nonatomic, readonly) NSString *labelDiscussion
Returns the label for the page.
Typically, the label is “1” for the first page, “2” for the second page, and so on, but nonnumerical labels are also possible (such as “xxi”, “4-1” and so on).
Declared In
CPDFPage.h
– boundsForBox:
	
– setBounds:forBox:
	
  rotation
	Sets the rotation angle for the page in degrees.
@property (nonatomic, assign) NSInteger rotationDiscussion
Sets the rotation angle for the page in degrees.
Rotation on a page. Must be 0, 90, 180 or 270 (negative rotations will be “normalized” to one of 0, 90, 180 or 270). Some PDF’s have an inherent rotation and so -[rotation] may be non-zero when a PDF is first opened.
Declared In
CPDFPage.h
  annotations
	Returns an array containing the page’s annotations.
@property (nonatomic, readonly) NSArray<CPDFAnnotation*> *annotationsDiscussion
Returns an array containing the page’s annotations.
The elements of the array will most likely be typed to subclasses of the CPDFAnnotation class.
Declared In
CPDFPage.h
– addAnnotation:
	Adds the specified annotation object to the page.
- (void)addAnnotation:(CPDFAnnotation *)annotationDiscussion
Adds the specified annotation object to the page.
Declared In
CPDFPage.h
– removeAnnotation:
	Removes the specified annotation from the page.
- (void)removeAnnotation:(CPDFAnnotation *)annotationDiscussion
Removes the specified annotation from the page.
Declared In
CPDFPage.h
– removeAllAnnotations
	Removes all annotations from the page.
- (void)removeAllAnnotationsDiscussion
Removes all annotations from the page.
Declared In
CPDFPage.h
– annotationAtPoint:
	Returns the annotation, if there is one, at the specified point.
- (CPDFAnnotation *)annotationAtPoint:(CGPoint)pointDiscussion
Returns the annotation, if there is one, at the specified point.
Use this method for hit-testing based on the current cursor position. If more than one annotation shares the specified point, the frontmost (or topmost) one is returned (the annotations are searched in reverse order of their appearance in the PDF data file). Returns NULL if there is no annotation at point. Specify the point in page space. Page space is a coordinate system with the origin at the lower-left corner of the current page.
Declared In
CPDFPage.h
– thumbnailOfSize:
	Convenience function that returns an image of this page, with annotations.
- (CPDFKitPlatformImage *)thumbnailOfSize:(CGSize)sizeDiscussion
Convenience function that returns an image of this page, with annotations.
Declared In
CPDFPage.h
– renderPageOfRect:pageDrawRectOptions:
	Convenience function that returns an image of this page’s bound.
- (CPDFKitPlatformImage *)renderPageOfRect:(CGRect)rect pageDrawRectOptions:(CPDFPageDrawRectOptions *)pageDrawRectOptionsDiscussion
Convenience function that returns an image of this page’s bound.
Declared In
CPDFPage.h
– thumbnailOfSize:needReset:completion:
	- (void)thumbnailOfSize:(CGSize)size needReset:(BOOL)reset completion:(void ( ^ ) ( CPDFKitPlatformImage *image ))completion– findEditString:withOptions:
	Page number search for content editing*
- (NSArray<NSArray<CPDFSelection*> *> *)findEditString:(NSString *)string withOptions:(CPDFSearchOptions)optionsDiscussion
Page number search for content editing*
Declared In
CPDFPage.h
  numberOfCharacters
	Returns the number of characters on the page, including whitespace characters.
@property (nonatomic, readonly) NSUInteger numberOfCharactersDiscussion
Returns the number of characters on the page, including whitespace characters.
Number of characters on the page (including linefeeds and spaces inserted).
Declared In
CPDFPage.h
– characterBoundsAtIndex:
	Returns the bounds, in page space, of the character at the specified index.
- (CGRect)characterBoundsAtIndex:(NSInteger)indexDiscussion
Returns the bounds, in page space, of the character at the specified index.
In the unlikely event that there is more than one character at the specified index point, only the bounds of the first character is returned. Page space is a coordinate system with the origin at the lower-left corner of the current page. Note that the bounds returned are not guaranteed to have integer coordinates.
Declared In
CPDFPage.h
– characterIndexAtPoint:
	Returns the character index value for the specified point in page space.
- (NSInteger)characterIndexAtPoint:(CGPoint)pointDiscussion
Returns the character index value for the specified point in page space.
Returns the index of the first character if multiple characters are at this point. If there is no character at the specified point, the method returns -1. Page space is a coordinate system with the origin at the lower-left corner of the current page.
Declared In
CPDFPage.h
  string
	Returns an NSString object representing the text on the page.
@property (nonatomic, readonly) NSString *stringDiscussion
Returns an NSString object representing the text on the page.
String (with linefeeds and in some cases spaces inserted) representing the text on the page.
Declared In
CPDFPage.h
– stringForRect:
	Returns the text enclosed within the specified rectangle, expressed in page coordinates.
- (NSString *)stringForRect:(CGRect)rectDiscussion
Returns the text enclosed within the specified rectangle, expressed in page coordinates.
Given a rect in page-space, returns a selection representing enclosed text on page.
Declared In
CPDFPage.h
– stringForRange:
	Returns the text enclosed within the specified range.
- (NSString *)stringForRange:(NSRange)rangeDiscussion
Returns the text enclosed within the specified range.
Declared In
CPDFPage.h
– stringForLocation:length:
	Returns the text enclosed within the specified range.
- (NSString *)stringForLocation:(NSUInteger)location length:(NSUInteger)lengthDiscussion
Returns the text enclosed within the specified range.
Declared In
CPDFPage.h
– selectionForRange:
	Returns the text contained within the specified range.
- (CPDFSelection *)selectionForRange:(NSRange)rangeDiscussion
Returns the text contained within the specified range.
Given a range, returns a selection representing text within that range. Will clamp any range that goes out of bounds. Will return NULL for an empty selection.
Declared In
CPDFPage.h
– applyRedactions
	Applies redaction annotations in the page.
- (void)applyRedactionsDiscussion
Applies redaction annotations in the page.
Declared In
CPDFPage.h