<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: 10.0.0 - 10.5.0",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGPDFDocumentGetCropBox",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@F@CGPDFDocumentGetCropBox"
  },
  "title" : "CGPDFDocumentGetCropBox"
}
-->

# CGPDFDocumentGetCropBox

Returns the crop box of a page in a PDF document.

```
extern CGRect CGPDFDocumentGetCropBox(CGPDFDocumentRef document, int page);
```

## Parameters

`document`

The PDF document to examine.

`page`

An integer that specifies the number of the page to examine.

## Return Value

A rectangle that represents the crop box for the specified page, expressed in default PDF user space units (points).

## Discussion

The replacement function for this one is [`getBoxRect(_:)`](/documentation/CoreGraphics/CGPDFPage/getBoxRect(_:)), which gets the rectangle associated with a type of box (art, media, crop, bleed trim) that represents a content region or page dimensions of a PDF page. For more information see [`CGPDFPage`](/documentation/CoreGraphics/CGPDFPage).

The crop box defines the region to which the contents of the page are to be clipped (or cropped) when displayed or printed. Unlike the other boxes, the crop box has no defined meaning in terms of physical page geometry or intended use—it merely suggests where the page should be clipped.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)