Function

CGPDFPageGetBoxRect

Returns the rectangle that represents a type of box for a content region or page dimensions of a PDF page.

Declaration

CGRect CGPDFPageGetBoxRect(CGPDFPageRef page, CGPDFBox box);

Parameters

page

A PDF page.

box

A constant that specifies the type of box. For possible values, see CGPDFBox.

Return Value

Returns the rectangle associated with the type of box specified by the box parameter in the specified page.

Discussion

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.

See Also

Getting Page Information

CGPDFPageGetDictionary

Returns the dictionary of a PDF page.

CGPDFPageGetDocument

Returns the document for a page.

CGPDFPageGetDrawingTransform

Returns the affine transform that maps a box to a given rectangle on a PDF page.

CGPDFPageGetPageNumber

Returns the page number of the specified PDF page.

CGPDFPageGetRotationAngle

Returns the rotation angle of a PDF page.