Page Edit
Page manipulation is the ability to perform changes to pages.
- To delete pages from a PDF document, use functionCPDFDocument::removePageAtIndexSet:
- To insert a blank page into a PDF document, use functionCPDFDocument::insertPage:atIndex:
- To insert an image as an entire page into a PDF document, use function CPDFDocument::insertPage:withImage:atIndex:
- To insert specific page from one document to another, use functionCPDFDocument::importPages:fromDocument:atIndex:
- To move a page to a new location, use functionCPDFDocument::movePageAtIndex:withPageAtIndex:
- To exchange the location of two document pages, use functionCPDFDocument::exchangePageAtIndex:withPageAtIndex:
- To replace original document pages with new pages from a different document, use functionCPDFDocument::removePageAtIndexSet:
and CPDFDocument::importPages:fromDocument:atIndex:
- To rotate a page in a PDF document, refer to the following method in theCPDFPage
class.
// 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.
@property (nonatomic,assign) NSInteger rotation;
- To rotate a page in a PDF document, refer to the following method in theCPDFPage
class.
/**
* Sets the bounds for the specified box.
*
* @discussion If the box does not exist, this method creates it for you.
* @see CPDFDisplayBox
*/
- (void)setBounds:(CGRect)bounds forBox:(CPDFDisplayBox)box;