Derived from | |
Framework | ApplicationServices/ApplicationServices.h |
Companion guide | |
Declared in | CGPDFPage.h |
The CGPDFPageRef
opaque type represents a page in a PDF document.
CGPDFPageGetBoxRect
CGPDFPageGetDictionary
CGPDFPageGetDocument
CGPDFPageGetDrawingTransform
CGPDFPageGetPageNumber
CGPDFPageGetRotationAngle
Returns the rectangle that represents a type of box for a content region or page dimensions of a PDF page.
CGRect CGPDFPageGetBoxRect ( CGPDFPageRef page, CGPDFBox box );
A PDF page.
A CGPDFBox
constant that specifies the type of box. For possible values, see “PDF Boxes”
.
Returns the rectangle associated with the type of box specified by the box
parameter in the specified page.
Returns the rectangle associated with the specified box in the specified page. This is the value of the corresponding entry (such as /MediaBox
, /ArtBox
, and so on) in the page’s dictionary.
CGPDFPage.h
Returns the dictionary of a PDF page.
CGPDFDictionaryRef CGPDFPageGetDictionary ( CGPDFPageRef page );
A PDF page.
Returns the PDF dictionary for the specified page.
CGPDFPage.h
Returns the document for a page.
CGPDFDocumentRef CGPDFPageGetDocument ( CGPDFPageRef page );
A PDF page.
The PDF document with which the specified page is associated.
CGPDFPage.h
Returns the affine transform that maps a box to a given rectangle on a PDF page.
CGAffineTransform CGPDFPageGetDrawingTransform ( CGPDFPageRef page, CGPDFBox box, CGRect rect, int rotate, bool preserveAspectRatio );
A PDF page.
A CGPDFBox
constant that specifies the type of box. For possible values, see “PDF Boxes”
.
A Quartz rectangle.
An integer, that must be a multiple of 90
, that specifies the angle by which the specified rectangle is rotated
clockwise.
A Boolean value that specifies whether or not the aspect ratio should be preserved. A value of true
specifies
that the aspect ratio should be preserved.
An affine transform that maps the box specified by the box
parameter to the rectangle specified by the rect
parameter.
Quartz constructs the affine transform as follows:
Computes the effective rectangle by intersecting the rectangle associated with box
and the /MediaBox
entry of the specified page.
Rotates the effective rectangle according to the page’s /Rotate
entry.
Centers the resulting rectangle on rect
.
If the value of the rotate
parameter is non-zero, then the rectangle is rotated clockwise by rotate degrees. The value of rotate
must be a multiple of 90.
Scales the rectangle, if necessary, so that it coincides with the edges of rect
. If the value of preserveAspectRatio
parameter is true
, then the final rectangle coincides with the edges of rect
only in the more restrictive dimension.
CGPDFPage.h
Returns the page number of the specified PDF page.
size_t CGPDFPageGetPageNumber ( CGPDFPageRef page );
A PDF page.
Returns the page number of the specified page.
CGPDFPage.h
Returns the rotation angle of a PDF page.
int CGPDFPageGetRotationAngle ( CGPDFPageRef page );
A PDF page.
The rotation angle (in degrees) of the specified page. This is the value of the /Rotate
entry in the page’s dictionary.
CGPDFPage.h
Returns the CFType ID for PDF page objects.
CFTypeID CGPDFPageGetTypeID ( void );
Returns the Core Foundation type for a PDF page.
CGPDFPage.h
Decrements the retain count of a PDF page.
void CGPDFPageRelease ( CGPDFPageRef page );
A PDF page.
This function is equivalent to CFRelease
, except that it does not cause an error if the page
parameter is NULL
.
CGPDFPage.h
Increments the retain count of a PDF page.
CGPDFPageRef CGPDFPageRetain ( CGPDFPageRef page );
A PDF page.
The same page you passed in as the page
parameter.
This function is equivalent to CFRetain
, except that it does not cause an error if the page
parameter is NULL
.
CGPDFPage.h
An opaque type that represents a page in a PDF document.
typedef struct CGPDFPage *CGPDFPageRef;
CGPDFPage.h
Box types for a PDF page.
enum CGPDFBox { kCGPDFMediaBox = 0, kCGPDFCropBox = 1, kCGPDFBleedBox = 2, kCGPDFTrimBox = 3, kCGPDFArtBox = 4 }; typedef enum CGPDFBox CGPDFBox;
kCGPDFMediaBox
The page media box—a rectangle, expressed in default user space units, that defines the boundaries of the physical medium on which the page is intended to be displayed or printed
Available in Mac OS X v10.3 and later.
Declared in CGPDFPage.h
.
kCGPDFCropBox
The page crop box—a rectangle, expressed in default user space units, that defines the visible region of default user space. When the page is displayed or printed, its contents are to be clipped to this rectangle.
Available in Mac OS X v10.3 and later.
Declared in CGPDFPage.h
.
kCGPDFBleedBox
The page bleed box—a rectangle, expressed in default user space units, that defines the region to which the contents of the page should be clipped when output in a production environment
Available in Mac OS X v10.3 and later.
Declared in CGPDFPage.h
.
kCGPDFTrimBox
The page trim box—a rectangle, expressed in default user space units, that defines the intended dimensions of the finished page after trimming.
Available in Mac OS X v10.3 and later.
Declared in CGPDFPage.h
.
kCGPDFArtBox
The page art box—a rectangle, expressed in default user space units, defining the extent of the page’s meaningful content (including potential white space) as intended by the page’s creator.
Available in Mac OS X v10.3 and later.
Declared in CGPDFPage.h
.
CGPDFPage.h
© 2003, 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-04-08)