---
title: kCGPDFContextMediaBox
framework: coregraphics
role: symbol
role_heading: Global Variable
path: coregraphics/kcgpdfcontextmediabox
---

# kCGPDFContextMediaBox

The media box for the document or for a given page.

## Declaration

```swift
let kCGPDFContextMediaBox: CFString
```

## Discussion

Discussion This key is optional. If present, the value of this key must be a CFData object that contains a CGRect (stored by value, not by reference).

## See Also

### Box Keys

- [kCGPDFContextCropBox](coregraphics/kcgpdfcontextcropbox.md)
- [kCGPDFContextBleedBox](coregraphics/kcgpdfcontextbleedbox.md)
- [kCGPDFContextTrimBox](coregraphics/kcgpdfcontexttrimbox.md)
- [kCGPDFContextArtBox](coregraphics/kcgpdfcontextartbox.md)
