Returns the bounds for the specified PDF display box.
- iOS 11.0+
- macOS 10.4+
- Mac Catalyst 13.0+
PDFDisplay enumeration defines the various box types (see Supporting Types for additional information about box types).
Note that only the media box is required for a PDF. If you request the bounds for the crop box, but the PDF does not include a crop box, the bounds for the media box are returned instead. If you request the bounds for other box types, and the PDF does not includes these types, the bounds for the crop box are returned instead.
The coordinates for the box are in page space, so you might need to transform the points if the page has a rotation on it. Also, note that the bounds
bounds returns are intersected with the page’s media box.
bounds throws a range exception if
box is not in range.