<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSView/adjustPageHeightNew(_:top:bottom:limit:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSView(im)adjustPageHeightNew:top:bottom:limit:"
  },
  "title" : "adjustPageHeightNew(_:top:bottom:limit:)"
}
-->

# adjustPageHeightNew(_:top:bottom:limit:)

Overridden by subclasses to adjust page height during automatic pagination.

```
func adjustPageHeightNew(_ newBottom: UnsafeMutablePointer<CGFloat>, top oldTop: CGFloat, bottom oldBottom: CGFloat, limit bottomLimit: CGFloat)
```

## Parameters

`newBottom`

Returns by indirection a new <doc://com.apple.documentation/documentation/CoreFoundation/CGFloat-swift.struct> value for the bottom edge of the pending page rectangle in the view’s coordinate system.

`oldTop`

A <doc://com.apple.documentation/documentation/CoreFoundation/CGFloat-swift.struct> value that sets the top edge of the pending page rectangle in the view’s coordinate system.

`oldBottom`

A <doc://com.apple.documentation/documentation/CoreFoundation/CGFloat-swift.struct> value that sets the bottom edge of the pending page rectangle in the view’s coordinate system.

`bottomLimit`

The topmost <doc://com.apple.documentation/documentation/CoreFoundation/CGFloat-swift.struct> value `newBottom` can be set to, as calculated using the value of the [`heightAdjustLimit`](/documentation/AppKit/NSView/heightAdjustLimit) property.

## Discussion

This method is invoked by [`printView(_:)`](/documentation/AppKit/NSView/printView(_:)). The view can raise the bottom edge and return the new value in `newBottom`, allowing it to prevent items such as lines of text from being divided across pages. If `bottomLimit` is exceeded, the pagination mechanism simply uses `bottomLimit` for the bottom edge.

The default implementation of this method propagates the message to its subviews, allowing nested views to adjust page height for their drawing as well. An [`NSButton`](/documentation/AppKit/NSButton) object or other small view, for example, will nudge the bottom edge up if necessary to prevent itself from being cut in two (thereby pushing it onto an adjacent page). Subclasses should invoke `super`’s implementation, if desired, after first making their own adjustments.

---

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)